================ @@ -206,3 +207,70 @@ def test_environment_with_special_char(self): self.assertEqual(value, evil_var) process.Continue() self.assertState(process.GetState(), lldb.eStateExited, PROCESS_EXITED) + + def test_target_launch_working_dir_prop(self): + """Test that the setting `target.launch-working-dir` is correctly used when launching a process.""" + d = {"CXX_SOURCES": "print_cwd.cpp"} + self.build(dictionary=d) + self.setTearDownCleanup(d) + exe = self.getBuildArtifact("a.out") + self.runCmd("file " + exe) + + mywd = "my_working_dir" + out_file_name = "my_working_dir_test.out" + + my_working_dir_path = self.getBuildArtifact(mywd) + lldbutil.mkdir_p(my_working_dir_path) + out_file_path = os.path.join(my_working_dir_path, out_file_name) + another_working_dir_path = Path( + os.path.join(my_working_dir_path, "..") + ).resolve() + + # Check that we correctly override the working dir ---------------- DavidSpickett wrote:
Please rewrite this so it's obvious what "correct" means. Like: ``` # If -w is passed to process launch, that value will be used instead of the setting. ``` https://github.com/llvm/llvm-project/pull/113521 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits