summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2018-12-17 21:18:11 +0000
committerAdrian Prantl <aprantl@apple.com>2018-12-17 21:18:11 +0000
commit4cf98e2c7b8ebe96e38751e6f60a7013a21ceb26 (patch)
treee8c5679e9e9bd435c681562f344558488c92b52b /lldb/packages/Python/lldbsuite/test/python_api
parent200885e654fc1663a9bdcd3fc444c56e1a0e64ed (diff)
downloadbcm5719-llvm-4cf98e2c7b8ebe96e38751e6f60a7013a21ceb26.tar.gz
bcm5719-llvm-4cf98e2c7b8ebe96e38751e6f60a7013a21ceb26.zip
Remove sleep() synchronisation from teststcase and
make the executable name more unique. This test is failing sporadically on some bots. By removing the sleep synchronisation, I'm hoping to get it to fail more reproducibly so I can investigate what is going on. llvm-svn: 349397
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
index b0f09d2fa7b..72a4eb6ed80 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
@@ -35,7 +35,7 @@ class HelloWorldTestCase(TestBase):
def test_with_process_launch_api(self):
"""Create target, breakpoint, launch a process, and then kill it."""
# Get the full path to our executable to be attached/debugged.
- exe = self.getBuildArtifact(self.testMethodName)
+ exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
@@ -82,7 +82,7 @@ class HelloWorldTestCase(TestBase):
@expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
def test_with_attach_to_process_with_id_api(self):
"""Create target, spawn a process, and attach to it with process id."""
- exe = self.getBuildArtifact(self.testMethodName)
+ exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
@@ -92,9 +92,6 @@ class HelloWorldTestCase(TestBase):
popen = self.spawnSubprocess(exe, ["abc", "xyz"])
self.addTearDownHook(self.cleanupSubprocesses)
- # Give the subprocess time to start and wait for user input
- time.sleep(0.25)
-
listener = lldb.SBListener("my.attach.listener")
error = lldb.SBError()
process = target.AttachToProcessWithID(listener, popen.pid, error)
@@ -114,7 +111,7 @@ class HelloWorldTestCase(TestBase):
@expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
def test_with_attach_to_process_with_name_api(self):
"""Create target, spawn a process, and attach to it with process name."""
- exe = self.getBuildArtifact(self.testMethodName)
+ exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
@@ -124,9 +121,6 @@ class HelloWorldTestCase(TestBase):
popen = self.spawnSubprocess(exe, ["abc", "xyz"])
self.addTearDownHook(self.cleanupSubprocesses)
- # Give the subprocess time to start and wait for user input
- time.sleep(0.25)
-
listener = lldb.SBListener("my.attach.listener")
error = lldb.SBError()
# Pass 'False' since we don't want to wait for new instance of
OpenPOWER on IntegriCloud