Skip to content

Commit 74338bf

Browse files
committed
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.
1 parent 64573da commit 74338bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lldb/test/API/commands/process/attach/TestProcessAttach.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def test_attach_to_process_from_different_dir_by_id(self):
7474
popen = self.spawnSubprocess(exe)
7575

7676
os.chdir(newdir)
77-
self.addTearDownHook(lambda: os.chdir(testdir))
77+
sourcedir = self.getSourceDir()
78+
self.addTearDownHook(lambda: os.chdir(sourcedir))
7879
self.runCmd("process attach -p " + str(popen.pid))
7980

8081
target = self.dbg.GetSelectedTarget()

0 commit comments

Comments
 (0)