diff options
author | Pavel Labath <labath@google.com> | 2017-02-10 11:49:25 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-02-10 11:49:25 +0000 |
commit | ae91babf2d2b205b44c12c0a66e5d35a0ffbebb4 (patch) | |
tree | 316ff6f5910b6fdd353428be3773fc9b9c1091ef /lldb/packages/Python/lldbsuite | |
parent | 5fae71c51cc8c3d51e86cd597ce91a254e9175f4 (diff) | |
download | bcm5719-llvm-ae91babf2d2b205b44c12c0a66e5d35a0ffbebb4.tar.gz bcm5719-llvm-ae91babf2d2b205b44c12c0a66e5d35a0ffbebb4.zip |
Improve asserts in TestWatchpointIgnoreCount
This test is flaky on the windows->android bot. Change assertTrue to
assertEqual in the hope better error messages will direct us to the
problem.
llvm-svn: 294737
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index 1bef9968b4a..2685ef819ca 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -56,7 +56,7 @@ class WatchpointIgnoreCountTestCase(TestBase): # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() - self.assertTrue(process.GetState() == lldb.eStateStopped, + self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED) thread = lldbutil.get_stopped_thread( process, lldb.eStopReasonBreakpoint) @@ -75,12 +75,12 @@ class WatchpointIgnoreCountTestCase(TestBase): self.HideStdout() # There should be only 1 watchpoint location under the target. - self.assertTrue(target.GetNumWatchpoints() == 1) + self.assertEqual(target.GetNumWatchpoints(), 1) watchpoint = target.GetWatchpointAtIndex(0) self.assertTrue(watchpoint.IsEnabled()) - self.assertTrue(watchpoint.GetIgnoreCount() == 0) + self.assertEqual(watchpoint.GetIgnoreCount(), 0) watch_id = watchpoint.GetID() - self.assertTrue(watch_id != 0) + self.assertNotEqual(watch_id, 0) print(watchpoint) # Now immediately set the ignore count to 2. When we continue, expect the @@ -90,12 +90,10 @@ class WatchpointIgnoreCountTestCase(TestBase): process.Continue() # At this point, the inferior process should have exited. - self.assertTrue( - process.GetState() == lldb.eStateExited, - PROCESS_EXITED) + self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED) # Verify some vital statistics. self.assertTrue(watchpoint) - self.assertTrue(watchpoint.GetWatchSize() == 4) - self.assertTrue(watchpoint.GetHitCount() == 2) + self.assertEqual(watchpoint.GetWatchSize(), 4) + self.assertEqual(watchpoint.GetHitCount(), 2) print(watchpoint) |