summaryrefslogtreecommitdiff
path: root/lldb/test/API/commands/process/attach
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2023-09-19 16:44:48 -0700
committerJim Ingham <jingham@apple.com>2023-09-19 16:46:08 -0700
commit74338bfe0cfec8b8db24af131cdeb664e346a1b5 (patch)
tree8778b0fd2515298eab3749373317989b7c1d3df6 /lldb/test/API/commands/process/attach
parent64573da4bf0bc7883e6d4d3debc60daf665d78b8 (diff)
A test was changing directory and then incorrectly restoring the directory
to the "testdir" which is the build directory for that test, not the original source directory. That caused subsequent tests to fail.
Diffstat (limited to 'lldb/test/API/commands/process/attach')
-rw-r--r--lldb/test/API/commands/process/attach/TestProcessAttach.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/test/API/commands/process/attach/TestProcessAttach.py b/lldb/test/API/commands/process/attach/TestProcessAttach.py
index 67bb134ec014..99ff3a4ec4db 100644
--- a/lldb/test/API/commands/process/attach/TestProcessAttach.py
+++ b/lldb/test/API/commands/process/attach/TestProcessAttach.py
@@ -74,7 +74,8 @@ class ProcessAttachTestCase(TestBase):
popen = self.spawnSubprocess(exe)
os.chdir(newdir)
- self.addTearDownHook(lambda: os.chdir(testdir))
+ sourcedir = self.getSourceDir()
+ self.addTearDownHook(lambda: os.chdir(sourcedir))
self.runCmd("process attach -p " + str(popen.pid))
target = self.dbg.GetSelectedTarget()