summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2020-08-14 13:12:12 +0200
committerRaphael Isemann <teemperor@gmail.com>2020-08-14 13:12:52 +0200
commitbb4efab9a4d9431dbedb27f04249effd0a73812e (patch)
tree1327969985754cdd59acb2411593b0c0b0a6a616 /lldb/test/API/python_api
parentfdc6aea3fd822b639baaa5b666fdf7598d08c8de (diff)
[lldb] Use SBProcess::Continue instead of 'run' command in TestTargetAPI.py
This test is flaky on Green Dragon as it often fails when the process state is "Invalid" in the assert: self.assertEqual(process.GetState(), lldb.eStateExited) It seems this is related to just doing "run" which apparently invalidates the Target's process in case it's still running and needs to be restarted. Just doing 'continue' on the process (and ignoring the error in case it already finished) prevents that and makes this consistently pass for me. Just pushing this out to get Green Dragon back online.
Diffstat (limited to 'lldb/test/API/python_api')
-rw-r--r--lldb/test/API/python_api/target/TestTargetAPI.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/test/API/python_api/target/TestTargetAPI.py b/lldb/test/API/python_api/target/TestTargetAPI.py
index de8bed08f5fa..85a6d78bdf5a 100644
--- a/lldb/test/API/python_api/target/TestTargetAPI.py
+++ b/lldb/test/API/python_api/target/TestTargetAPI.py
@@ -168,7 +168,7 @@ class TargetAPITestCase(TestBase):
process = target.LaunchSimple(
['foo', 'bar'], ['baz'], self.get_process_working_directory())
- self.runCmd("run")
+ process.Continue()
self.assertEqual(process.GetState(), lldb.eStateExited)
output = process.GetSTDOUT(9999)
self.assertIn('arg: foo', output)
@@ -179,7 +179,7 @@ class TargetAPITestCase(TestBase):
self.runCmd("setting set target.env-vars bar=baz")
process = target.LaunchSimple(None, None,
self.get_process_working_directory())
- self.runCmd("run")
+ process.Continue()
self.assertEqual(process.GetState(), lldb.eStateExited)
output = process.GetSTDOUT(9999)
self.assertIn('arg: foo', output)
@@ -188,7 +188,7 @@ class TargetAPITestCase(TestBase):
self.runCmd("settings set target.disable-stdio true")
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.runCmd("run")
+ process.Continue()
self.assertEqual(process.GetState(), lldb.eStateExited)
output = process.GetSTDOUT(9999)
self.assertEqual(output, "")