summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2019-10-09 21:41:02 +0000
committerFrederic Riss <friss@apple.com>2019-10-09 21:41:02 +0000
commitffb26d9c7830f0f957caca155c2c56e173043906 (patch)
tree36b294a1f647b69dee41ed9c7112232e4c09941f /lldb/packages/Python/lldbsuite
parent09dcfe68057082207f47da230c1c2618ce3aadca (diff)
downloadbcm5719-llvm-ffb26d9c7830f0f957caca155c2c56e173043906.tar.gz
bcm5719-llvm-ffb26d9c7830f0f957caca155c2c56e173043906.zip
TestHelloWorld: Make compatible with remote testing
The synchronization token handling was not remote-friendly. llvm-svn: 374234
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py24
1 files changed, 14 insertions, 10 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 a762dc97e39..a94b19b3502 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
@@ -78,17 +78,19 @@ class HelloWorldTestCase(TestBase):
@expectedFailureNetBSD
def test_with_attach_to_process_with_id_api(self):
"""Create target, spawn a process, and attach to it with process id."""
- exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
+ exe = '%s_%d'%(self.testMethodName, os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
- target = self.dbg.CreateTarget(exe)
+ target = self.dbg.CreateTarget(self.getBuildArtifact(exe))
# Spawn a new process
token = exe+'.token'
- if os.path.exists(token):
- os.remove(token)
- popen = self.spawnSubprocess(exe, [token])
+ if not lldb.remote_platform:
+ token = self.getBuildArtifact(token)
+ if os.path.exists(token):
+ os.remove(token)
+ popen = self.spawnSubprocess(self.getBuildArtifact(exe), [token])
self.addTearDownHook(self.cleanupSubprocesses)
lldbutil.wait_for_file_on_target(self, token)
@@ -110,17 +112,19 @@ class HelloWorldTestCase(TestBase):
@expectedFailureNetBSD
def test_with_attach_to_process_with_name_api(self):
"""Create target, spawn a process, and attach to it with process name."""
- exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
+ exe = '%s_%d'%(self.testMethodName, os.getpid())
d = {'EXE': exe}
self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
- target = self.dbg.CreateTarget(exe)
+ target = self.dbg.CreateTarget(self.getBuildArtifact(exe))
# Spawn a new process.
token = exe+'.token'
- if os.path.exists(token):
- os.remove(token)
- popen = self.spawnSubprocess(exe, [token])
+ if not lldb.remote_platform:
+ token = self.getBuildArtifact(token)
+ if os.path.exists(token):
+ os.remove(token)
+ popen = self.spawnSubprocess(self.getBuildArtifact(exe), [token])
self.addTearDownHook(self.cleanupSubprocesses)
lldbutil.wait_for_file_on_target(self, token)
OpenPOWER on IntegriCloud