Importing rustc-1.56.0 Change-Id: I98941481270706fa55f8fb2cb91686ae3bd30f38
diff --git a/src/llvm-project/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py b/src/llvm-project/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py index 49ecf7a..f135ed6 100644 --- a/src/llvm-project/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py +++ b/src/llvm-project/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py
@@ -25,7 +25,6 @@ self.line = line_number( self.source, '// Set break point at this line.') - @add_test_categories(['pyapi']) # Read-write watchpoints not supported on SystemZ @expectedFailureAll(archs=['s390x']) def test_watch_val(self): @@ -49,7 +48,7 @@ # 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) @@ -98,8 +97,8 @@ process.Continue() # At this point, the inferior process should have exited. - self.assertTrue( - process.GetState() == lldb.eStateExited, + self.assertEqual( + process.GetState(), lldb.eStateExited, PROCESS_EXITED) self.dbg.DeleteTarget(target)
diff --git a/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py b/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py index 83a11d4..d0fd398 100644 --- a/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py
@@ -25,7 +25,6 @@ self.line = line_number( self.source, '// Set break point at this line.') - @add_test_categories(['pyapi']) # Read-write watchpoints not supported on SystemZ @expectedFailureAll(archs=['s390x']) def test_set_watch_ignore_count(self):
diff --git a/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIter.py b/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIter.py index 44df96b..6ca9999 100644 --- a/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIter.py +++ b/src/llvm-project/lldb/test/API/python_api/watchpoint/TestWatchpointIter.py
@@ -30,7 +30,6 @@ self.line = line_number( self.source, '// Set break point at this line.') - @add_test_categories(['pyapi']) def test_watch_iter(self): """Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpoints.""" self.build() @@ -52,7 +51,7 @@ # 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) @@ -71,7 +70,7 @@ self.HideStdout() # There should be only 1 watchpoint location under the target. - self.assertTrue(target.GetNumWatchpoints() == 1) + self.assertEqual(target.GetNumWatchpoints(), 1) self.assertTrue(watchpoint.IsEnabled()) watch_id = watchpoint.GetID() self.assertTrue(watch_id != 0) @@ -105,7 +104,7 @@ # Now disable the 'rw' watchpoint. The program won't stop when it reads # 'global' next. watchpoint.SetEnabled(False) - self.assertTrue(watchpoint.GetHardwareIndex() == -1) + self.assertEqual(watchpoint.GetHardwareIndex(), -1) self.assertFalse(watchpoint.IsEnabled()) # Continue. The program does not stop again when the variable is being @@ -113,13 +112,13 @@ process.Continue() # At this point, the inferior process should have exited. - self.assertTrue( - process.GetState() == lldb.eStateExited, + self.assertEqual( + process.GetState(), lldb.eStateExited, PROCESS_EXITED) # Verify some vital statistics and exercise the iterator API. for watchpoint in target.watchpoint_iter(): self.assertTrue(watchpoint) - self.assertTrue(watchpoint.GetWatchSize() == 4) - self.assertTrue(watchpoint.GetHitCount() == 1) + self.assertEqual(watchpoint.GetWatchSize(), 4) + self.assertEqual(watchpoint.GetHitCount(), 1) print(watchpoint)
diff --git a/src/llvm-project/lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/src/llvm-project/lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py index 7334734..847f678 100644 --- a/src/llvm-project/lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py +++ b/src/llvm-project/lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
@@ -54,7 +54,7 @@ # 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) @@ -92,4 +92,4 @@ self.DebugSBValue(value) # Verify that the condition is met. - self.assertTrue(value.GetValueAsUnsigned() == 5) + self.assertEqual(value.GetValueAsUnsigned(), 5)
diff --git a/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py index 9cbc396..7df7285 100644 --- a/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py +++ b/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
@@ -28,7 +28,6 @@ # This is for verifying that watch location works. self.violating_func = "do_bad_thing_with_location" - @add_test_categories(['pyapi']) def test_watch_location(self): """Exercise SBValue.WatchPointee() API to set a watchpoint.""" self.build() @@ -50,7 +49,7 @@ # 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)
diff --git a/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index 53e794d..15d9b2a 100644 --- a/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/src/llvm-project/lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
@@ -27,7 +27,6 @@ # This is for verifying that watch location works. self.violating_func = "do_bad_thing_with_location" - @add_test_categories(['pyapi']) def test_watch_address(self): """Exercise SBTarget.WatchAddress() API to set a watchpoint.""" self.build() @@ -49,7 +48,7 @@ # 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) @@ -99,7 +98,6 @@ # This finishes our test. - @add_test_categories(['pyapi']) # No size constraint on MIPS for watches @skipIf(archs=['mips', 'mipsel', 'mips64', 'mips64el']) @skipIf(archs=['s390x']) # Likewise on SystemZ @@ -124,7 +122,7 @@ # 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)