aboutsummaryrefslogtreecommitdiff
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)
downloadllvm-bb4efab9a4d9431dbedb27f04249effd0a73812e.zip
llvm-bb4efab9a4d9431dbedb27f04249effd0a73812e.tar.gz
llvm-bb4efab9a4d9431dbedb27f04249effd0a73812e.tar.bz2
[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 de8bed0..85a6d78 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, "")