summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/process_attach
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/process_attach')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py12
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
index c4d372cd3d3..94a013b53ce 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
@@ -27,7 +27,7 @@ class ProcessAttachTestCase(TestBase):
def test_attach_to_process_by_id(self):
"""Test attach by process id"""
self.build()
- exe = os.path.join(os.getcwd(), exe_name)
+ exe = self.getBuildArtifact(exe_name)
# Spawn a new process
popen = self.spawnSubprocess(exe)
@@ -43,13 +43,13 @@ class ProcessAttachTestCase(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_attach_to_process_from_different_dir_by_id(self):
"""Test attach by process id"""
+ newdir = self.getBuildArtifact("newdir")
try:
- os.mkdir(os.path.join(os.getcwd(),'newdir'))
+ os.mkdir(newdir)
except OSError, e:
if e.errno != os.errno.EEXIST:
raise
- testdir = os.getcwd()
- newdir = os.path.join(testdir,'newdir')
+ testdir = self.getBuildDir()
exe = os.path.join(newdir, 'proc_attach')
self.buildProgram('main.cpp', exe)
self.addTearDownHook(lambda: shutil.rmtree(newdir))
@@ -58,7 +58,7 @@ class ProcessAttachTestCase(TestBase):
popen = self.spawnSubprocess(exe)
self.addTearDownHook(self.cleanupSubprocesses)
- os.chdir('newdir')
+ os.chdir(newdir)
self.addTearDownHook(lambda: os.chdir(testdir))
self.runCmd("process attach -p " + str(popen.pid))
@@ -71,7 +71,7 @@ class ProcessAttachTestCase(TestBase):
def test_attach_to_process_by_name(self):
"""Test attach by process name"""
self.build()
- exe = os.path.join(os.getcwd(), exe_name)
+ exe = self.getBuildArtifact(exe_name)
# Spawn a new process
popen = self.spawnSubprocess(exe)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
index 5465b7155f5..481ec6d7c05 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
@@ -25,7 +25,7 @@ class AttachDeniedTestCase(TestBase):
def test_attach_to_process_by_id_denied(self):
"""Test attach by process id denied"""
self.build()
- exe = os.path.join(os.getcwd(), exe_name)
+ exe = self.getBuildArtifact(exe_name)
# Use a file as a synchronization point between test and inferior.
pid_file_path = lldbutil.append_to_process_working_directory(
OpenPOWER on IntegriCloud