Index: packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py =================================================================== --- packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py +++ packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py @@ -19,7 +19,7 @@ @skipUnlessPlatform(['android']) def test_cache_line_size(self): self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target and target.IsValid(), "Target is valid") Index: packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py =================================================================== --- packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py +++ packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py @@ -39,7 +39,7 @@ def sanity_check_executable(self, exe_name): """Sanity check executable compiled from the auto-generated program.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) self.runCmd("file %s" % exe, CURRENT_EXECUTABLE_SET) self.line_to_break = line_number( Index: packages/Python/lldbsuite/test/api/listeners/TestListener.py =================================================================== --- packages/Python/lldbsuite/test/api/listeners/TestListener.py +++ packages/Python/lldbsuite/test/api/listeners/TestListener.py @@ -35,7 +35,7 @@ lldb.SBTarget.GetBroadcasterClassName(), lldb.SBTarget.eBroadcastBitBreakpointChanged) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py =================================================================== --- packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py +++ packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py @@ -32,12 +32,12 @@ def test_multiple_debuggers(self): env = {self.dylibPath: self.getLLDBLibraryEnvVal()} - self.driver_exe = os.path.join(os.getcwd(), "multi-process-driver") + self.driver_exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "multi-process-driver") self.buildDriver('multi-process-driver.cpp', self.driver_exe) self.addTearDownHook(lambda: os.remove(self.driver_exe)) self.signBinary(self.driver_exe) - self.inferior_exe = os.path.join(os.getcwd(), "testprog") + self.inferior_exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "testprog") self.buildDriver('testprog.cpp', self.inferior_exe) self.addTearDownHook(lambda: os.remove(self.inferior_exe)) Index: packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py =================================================================== --- packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py +++ packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py @@ -26,7 +26,7 @@ def test_multiple_targets(self): env = {self.dylibPath: self.getLLDBLibraryEnvVal()} - self.driver_exe = os.path.join(os.getcwd(), "multi-target") + self.driver_exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "multi-target") self.buildDriver('main.cpp', self.driver_exe) self.addTearDownHook(lambda: os.remove(self.driver_exe)) self.signBinary(self.driver_exe) Index: packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py =================================================================== --- packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py +++ packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py @@ -92,7 +92,7 @@ self.buildDriver(sources, test_name) self.addTearDownHook(lambda: os.remove(test_name)) - test_exe = os.path.join(os.getcwd(), test_name) + test_exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, test_name) self.signBinary(test_exe) exe = [test_exe, self.inferior] Index: packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py =================================================================== --- packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py +++ packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py @@ -21,7 +21,7 @@ @skipIf(archs=no_match(["arm"])) def test_false(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("target create %s" % exe) lldbutil.run_break_set_by_symbol(self, "bkpt_false", @@ -34,7 +34,7 @@ @skipIf(archs=no_match(["arm"])) def test_true(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("target create %s" % exe) bpid = lldbutil.run_break_set_by_symbol(self, "bkpt_true", Index: packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py =================================================================== --- packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py +++ packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py @@ -39,7 +39,7 @@ def run_lldb_repeated_exprs(self, exe_name, count): import pexpect - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Set self.child_prompt, which is "(lldb) ". self.child_prompt = '(lldb) ' Index: packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py =================================================================== --- packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py +++ packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py @@ -44,7 +44,7 @@ def run_lldb_repeated_exprs(self, exe_name, count): import pexpect - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Set self.child_prompt, which is "(lldb) ". self.child_prompt = '(lldb) ' @@ -94,7 +94,7 @@ def run_gdb_repeated_exprs(self, exe_name, count): import pexpect - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Set self.child_prompt, which is "(gdb) ". self.child_prompt = '(gdb) ' Index: packages/Python/lldbsuite/test/concurrent_base.py =================================================================== --- packages/Python/lldbsuite/test/concurrent_base.py +++ packages/Python/lldbsuite/test/concurrent_base.py @@ -114,7 +114,7 @@ watchpoint_func. The inferior is continued until exit or a crash takes place, and the number of events seen by LLDB is verified to match the expected number of events. """ - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Get the target Index: packages/Python/lldbsuite/test/darwin_log.py =================================================================== --- packages/Python/lldbsuite/test/darwin_log.py +++ packages/Python/lldbsuite/test/darwin_log.py @@ -162,7 +162,7 @@ if enable_options is not None and len(enable_options) > 0: enable_cmd += ' ' + ' '.join(enable_options) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.run_lldb_to_breakpoint(exe, self.source, self.line, enable_command=enable_cmd, settings_commands=settings_commands) @@ -346,7 +346,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/dosep.py =================================================================== --- packages/Python/lldbsuite/test/dosep.py +++ packages/Python/lldbsuite/test/dosep.py @@ -1623,7 +1623,7 @@ adjust_inferior_options(dotest_argv) - session_dir = os.path.join(os.getcwd(), dotest_options.s) + session_dir = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, dotest_options.s) # The root directory was specified on the command line test_directory = os.path.dirname(os.path.realpath(__file__)) Index: packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py =================================================================== --- packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py +++ packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py @@ -46,7 +46,7 @@ self.setTearDownCleanup() import pexpect - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") prompt = "(lldb) " # Pass CRASH so the process will crash and stop in batch mode. @@ -86,7 +86,7 @@ self.setTearDownCleanup() import pexpect - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") prompt = "(lldb) " # Now do it again, and make sure if we don't crash, we quit: @@ -129,7 +129,7 @@ self.setTearDownCleanup() import pexpect - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") prompt = "(lldb) " # Finally, start up the process by hand, attach to it, and wait for its completion. Index: packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py =================================================================== --- packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py +++ packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py @@ -22,7 +22,7 @@ self.expr_syscall() def expr_syscall(self): - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py =================================================================== --- packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py +++ packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py @@ -17,7 +17,7 @@ """Test support for PHI nodes in the IR interpreter.""" self.build() - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET) # Break on the first assignment to i Index: packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py =================================================================== --- packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py +++ packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py @@ -28,7 +28,7 @@ """Test that multiline expressions work correctly""" self.build() import pexpect - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") prompt = "(lldb) " # So that the child gets torn down after the test. Index: packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py =================================================================== --- packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py +++ packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py @@ -28,7 +28,7 @@ self.main_source = "main.cpp" self.main_source_spec = lldb.SBFileSpec(self.main_source) self.line = line_number('main.cpp', '// breakpoint_in_main') - self.exe = os.path.join(os.getcwd(), "a.out") + self.exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") def test_expr_options(self): """These expression command options should work as expected.""" Index: packages/Python/lldbsuite/test/expression_command/test/TestExprs.py =================================================================== --- packages/Python/lldbsuite/test/expression_command/test/TestExprs.py +++ packages/Python/lldbsuite/test/expression_command/test/TestExprs.py @@ -107,7 +107,7 @@ """Test SBFrame.EvaluateExpression() API for evaluating an expression.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/apropos_with_process/TestAproposWithProcess.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/apropos_with_process/TestAproposWithProcess.py +++ packages/Python/lldbsuite/test/functionalities/apropos_with_process/TestAproposWithProcess.py @@ -26,7 +26,7 @@ def test_apropos_with_process(self): """Test that apropos env doesn't crash trying to touch the process plugin commmand.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break in main() aftre the variables are assigned values. Index: packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py +++ packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py @@ -35,7 +35,7 @@ """Break inside a() and b() defined within libfoo.a.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside a() by file and line first. Index: packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py +++ packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py @@ -37,7 +37,7 @@ self.line_breakpoint = line_number('main.c', '// break line') def asan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py +++ packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py @@ -39,7 +39,7 @@ self.line_crash = line_number('main.c', '// BOOM line') def asan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py +++ packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py @@ -30,7 +30,7 @@ def process_attach_continue_interrupt_detach(self): """Test attach/continue/interrupt/detach""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) popen = self.spawnSubprocess(exe) self.addTearDownHook(self.cleanupSubprocesses) Index: packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py +++ packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py @@ -52,7 +52,7 @@ def do_test(self, commands): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") for c in commands: self.runCmd(c) @@ -81,7 +81,7 @@ @skipIfDarwinEmbedded # # debugserver on ios has an extra fd open on launch def test_fd_leak_multitarget(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) breakpoint = target.BreakpointCreateBySourceRegex( Index: packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py @@ -30,7 +30,7 @@ def address_breakpoints(self): """Test address breakpoints set with shared library of SBAddress work correctly.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py @@ -36,7 +36,7 @@ def make_target_and_bkpt(self, additional_options=None, num_expected_loc=1, pattern="Set a breakpoint here"): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target.IsValid(), "Target is not valid") Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_case_sensitivity/TestBreakpointCaseSensitivity.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_case_sensitivity/TestBreakpointCaseSensitivity.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_case_sensitivity/TestBreakpointCaseSensitivity.py @@ -39,7 +39,7 @@ if case_insensitive: exe = exe.upper() - exe = os.path.join(os.getcwd(), exe) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe) # Create a target by the debugger. self.target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -51,7 +51,7 @@ def breakpoint_command_sequence(self): """Test a sequence of breakpoint command add, list, and delete.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add three breakpoints on the same line. The first time we don't specify the file, @@ -237,7 +237,7 @@ def breakpoint_command_script_parameters(self): """Test that the frame and breakpoint location are being properly passed to the script breakpoint command function.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint. @@ -280,7 +280,7 @@ def breakpoint_commands_on_creation(self): """Test that setting breakpoint commands when creating the breakpoint works""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target.IsValid(), "Created an invalid target.") Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py @@ -31,7 +31,7 @@ self.main_source_spec = lldb.SBFileSpec(self.main_source) def do_set_python_command_from_python(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") error = lldb.SBError() self.target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py @@ -31,7 +31,7 @@ def regexp_break_command(self): """Test the super consie "b" command, which is analias for _regexp-break.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) break_results = lldbutil.run_break_set_command( @@ -54,7 +54,7 @@ num_locations=1) # Check breakpoint with full file path. - full_path = os.path.join(os.getcwd(), self.source) + full_path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.source) break_results = lldbutil.run_break_set_command( self, "b %s:%d" % (full_path, self.line)) lldbutil.check_breakpoint_result( Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py @@ -59,7 +59,7 @@ def breakpoint_conditions(self, inline=False): """Exercise breakpoint condition with 'breakpoint modify -c id'.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) if inline: @@ -132,7 +132,7 @@ def breakpoint_conditions_python(self): """Use Python APIs to set breakpoint conditions.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -200,7 +200,7 @@ def breakpoint_invalid_conditions_python(self): """Use Python APIs to set breakpoint conditions.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py @@ -32,7 +32,7 @@ def do_test_breakpoint_location_hit_count(self): """Use Python APIs to check breakpoint hit count.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py @@ -19,7 +19,7 @@ def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect("file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py @@ -46,7 +46,7 @@ def breakpoint_ignore_count(self): """Exercise breakpoint ignore count with 'breakpoint set -i '.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Create a breakpoint in main.c at line1. @@ -101,7 +101,7 @@ def breakpoint_ignore_count_python(self): """Use Python APIs to set breakpoint ignore count.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py @@ -21,7 +21,7 @@ @skipIf(archs=no_match(re.compile('mips*'))) def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect("file " + exe, patterns=["Current executable set to .*a.out.*"]) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py @@ -36,7 +36,7 @@ self.build() # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") error = lldb.SBError() # Don't read in dependencies so we don't come across false matches that # add unwanted breakpoint hits. @@ -77,7 +77,7 @@ self.build() # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") error = lldb.SBError() # Don't read in dependencies so we don't come across false matches that # add unwanted breakpoint hits. Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py @@ -41,7 +41,7 @@ self.line = line_number('main.c', '// Set break point at this line.') def set_breakpoint (self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, "Target %s is not valid"%(exe)) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py @@ -58,12 +58,12 @@ self.do_check_configuring_permissions_cli() def setup_target(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a targets we are making breakpoint in and copying to: self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) - self.main_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), "main.c")) + self.main_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "main.c")) def check_name_in_target(self, bkpt_name): name_list = lldb.SBStringList() Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py @@ -28,7 +28,7 @@ def breakpoint_options_test(self): """Test breakpoint command for different options.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint with 1 locations. @@ -78,7 +78,7 @@ def breakpoint_options_language_test(self): """Test breakpoint command for language option.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint with 1 locations. Index: packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py @@ -26,7 +26,7 @@ TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number(_SRC_FILE, '// Set break point at this line.') - self.src_path = os.path.join(os.getcwd(), _SRC_FILE) + self.src_path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, _SRC_FILE) @skipIf(hostoslist=["windows"]) def test_symlink_paths_set(self): @@ -59,7 +59,7 @@ self.line) def create_src_symlink(self): - pwd_symlink = os.path.join(os.getcwd(), 'pwd_symlink') + pwd_symlink = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'pwd_symlink') if os.path.exists(pwd_symlink): os.unlink(pwd_symlink) os.symlink(os.getcwd(), pwd_symlink) @@ -69,5 +69,5 @@ def doBuild(self, pwd_symlink): self.build(None, None, {'PWD': pwd_symlink}, True) - exe = os.path.join(os.getcwd(), _EXE_NAME) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, _EXE_NAME) self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py @@ -45,7 +45,7 @@ def breakpoint_id_tests(self): # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) bp_dicts = [ @@ -69,7 +69,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764") def test_destructors(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) # Don't skip prologue, so we can check the breakpoint address more Index: packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py @@ -32,7 +32,7 @@ self.main_source_spec = lldb.SBFileSpec(self.main_source) def do_cpp_exception_bkpt(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") error = lldb.SBError() self.target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py @@ -20,7 +20,7 @@ def test_asm_int_3(self): """Test that intrinsics like `__debugbreak();` and `asm {"int3"}` are treated like breakpoints.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Run the program. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py @@ -46,7 +46,7 @@ # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # The breakpoint list should show 3 locations. Index: packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py @@ -25,7 +25,7 @@ @expectedFailureAll(bugnumber="llvm.org/pr35480", oslist=["linux"]) def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file %s" % exe) bp_main = lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py @@ -33,7 +33,7 @@ def inlined_breakpoints(self): """Test 'b basic_types.cpp:176' does break (where int.cpp includes basic_type.cpp).""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # With the inline-breakpoint-strategy, our file+line breakpoint should Index: packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py @@ -73,7 +73,7 @@ self.dbg.SetAsync(False) # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py @@ -60,7 +60,7 @@ self.addTearDownHook(cleanup) self.RemoveTempFile(self.bkpts_file_path) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create the targets we are making breakpoints in and copying them to: self.orig_target = self.dbg.CreateTarget(exe) @@ -73,7 +73,7 @@ # Call super's setUp(). TestBase.setUp(self) - self.bkpts_file_path = os.path.join(os.getcwd(), "breakpoints.json") + self.bkpts_file_path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "breakpoints.json") self.bkpts_file_spec = lldb.SBFileSpec(self.bkpts_file_path) def check_equivalence(self, source_bps, do_write = True): @@ -119,7 +119,7 @@ empty_module_list = lldb.SBFileSpecList() empty_cu_list = lldb.SBFileSpecList() - blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), "blubby.c")) + blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. @@ -147,7 +147,7 @@ cu_list.Append(lldb.SBFileSpec("AnotherCU.c")) cu_list.Append(lldb.SBFileSpec("ThirdCU.c")) - blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), "blubby.c")) + blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. @@ -174,7 +174,7 @@ empty_module_list = lldb.SBFileSpecList() empty_cu_list = lldb.SBFileSpecList() - blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), "blubby.c")) + blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. @@ -218,7 +218,7 @@ empty_module_list = lldb.SBFileSpecList() empty_cu_list = lldb.SBFileSpecList() - blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), "blubby.c")) + blubby_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. Index: packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py @@ -28,7 +28,7 @@ def source_regex_locations(self): """ Test that restricting source expressions to files & to functions. """ # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -64,7 +64,7 @@ def source_regex_restrictions(self): """ Test that restricting source expressions to files & to functions. """ # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py +++ packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py @@ -21,7 +21,7 @@ TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") src = lldb.SBFileSpec("main.cpp") # Create a target by the debugger. Index: packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py +++ packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py @@ -27,7 +27,7 @@ self.expect('targetname', substrs=['a.out'], matching=False, error=True) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect("file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py +++ packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py @@ -32,7 +32,7 @@ """Test that LLDB correctly allows scripted commands to set immediate output to the console.""" self.launch(timeout=10) - script = os.path.join(os.getcwd(), 'custom_command.py') + script = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'custom_command.py') prompt = "\(lldb\) " self.sendline('command script import %s' % script, patterns=[prompt]) @@ -54,12 +54,12 @@ """Test that LLDB correctly allows scripted commands to set immediate output to a file.""" self.launch(timeout=10) - test_files = {os.path.join(os.getcwd(), 'read.txt'): 'r', - os.path.join(os.getcwd(), 'write.txt'): 'w', - os.path.join(os.getcwd(), 'append.txt'): 'a', - os.path.join(os.getcwd(), 'write_plus.txt'): 'w+', - os.path.join(os.getcwd(), 'read_plus.txt'): 'r+', - os.path.join(os.getcwd(), 'append_plus.txt'): 'a+'} + test_files = {os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'read.txt'): 'r', + os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'write.txt'): 'w', + os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'append.txt'): 'a', + os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'write_plus.txt'): 'w+', + os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'read_plus.txt'): 'r+', + os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'append_plus.txt'): 'a+'} starter_string = 'Starter Garbage\n' write_string = 'writing to file with mode: ' @@ -68,7 +68,7 @@ with open(path, 'w+') as init: init.write(starter_string) - script = os.path.join(os.getcwd(), 'custom_command.py') + script = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'custom_command.py') prompt = "\(lldb\) " self.sendline('command script import %s' % script, patterns=[prompt]) Index: packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py +++ packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py @@ -39,7 +39,7 @@ bugnumber="llvm.org/pr26265: args in frames other than #0 are not evaluated correctly") def do_conditional_break(self): """Exercise some thread and frame APIs to break if c() is called by a().""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py +++ packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py @@ -24,7 +24,7 @@ @skipIfDarwin # rdar://25499635 def test_with_run_command(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target and target.IsValid(), "Target is valid") Index: packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py +++ packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py @@ -28,7 +28,7 @@ def test(self): """Test breakpoint works correctly with dead-code stripping.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break by function name f1 (live code). Index: packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py +++ packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py @@ -22,7 +22,7 @@ bugnumber="function names print fully demangled instead of name-only") def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect("file " + exe, patterns=["Current executable set to .*a.out.*"]) Index: packages/Python/lldbsuite/test/functionalities/disassembly/TestFrameDisassemble.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/disassembly/TestFrameDisassemble.py +++ packages/Python/lldbsuite/test/functionalities/disassembly/TestFrameDisassemble.py @@ -30,7 +30,7 @@ def frame_disassemble_test(self): """Sample test to ensure SBFrame::Disassemble produces SOME output""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py +++ packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py @@ -39,7 +39,7 @@ """Test fetching C++ dynamic values from pointers & references.""" """Get argument vals for the call stack when stopped on a breakpoint.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py +++ packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py @@ -29,7 +29,7 @@ """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.""" self.build() import pexpect - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") prompt = "(lldb) " python_prompt = ">>> " Index: packages/Python/lldbsuite/test/functionalities/exec/TestExec.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/exec/TestExec.py +++ packages/Python/lldbsuite/test/functionalities/exec/TestExec.py @@ -44,8 +44,8 @@ def do_test(self, skip_exec): if self.getArchitecture() == 'x86_64': - source = os.path.join(os.getcwd(), "main.cpp") - o_file = os.path.join(os.getcwd(), "main.o") + source = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "main.cpp") + o_file = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "main.o") execute_command( "'%s' -g -O0 -arch i386 -arch x86_64 '%s' -c -o '%s'" % (os.environ["CC"], source, o_file)) @@ -53,12 +53,12 @@ "'%s' -g -O0 -arch i386 -arch x86_64 '%s'" % (os.environ["CC"], o_file)) if self.debug_info != "dsym": - dsym_path = os.path.join(os.getcwd(), "a.out.dSYM") + dsym_path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out.dSYM") execute_command("rm -rf '%s'" % (dsym_path)) else: self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create the target target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py +++ packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py @@ -26,7 +26,7 @@ def test_with_run_command(self): """Test that expr will time out and allow other threads to run if it blocks.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py +++ packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py @@ -34,7 +34,7 @@ DWARF in .o file debugging. The only thing this test needs to do is to compile and set a breakpoint in the target and verify any breakpoint locations have valid debug info for the function, and source file and line.''' - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create the target target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py @@ -19,7 +19,7 @@ def test_array(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py @@ -19,7 +19,7 @@ def test_bad_reference(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py @@ -19,7 +19,7 @@ def test_diagnose_dereference_argument(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py @@ -19,7 +19,7 @@ def test_diagnose_dereference_argument(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py @@ -20,7 +20,7 @@ def test_diagnose_dereference_function_return(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py @@ -19,7 +19,7 @@ def test_diagnose_dereference_this(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py @@ -19,7 +19,7 @@ def test_diagnose_inheritance(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py @@ -19,7 +19,7 @@ def test_local_variable(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py +++ packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py @@ -19,7 +19,7 @@ def test_diagnose_virtual_method_call(self): TestBase.setUp(self) self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) self.expect("thread list", "Thread should be stopped", Index: packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py +++ packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py @@ -39,7 +39,7 @@ def do_test(self): """Test GuessLanguage for C & C++.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/frame_var/TestFrameVar.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/frame_var/TestFrameVar.py +++ packages/Python/lldbsuite/test/functionalities/frame_var/TestFrameVar.py @@ -31,7 +31,7 @@ TestBase.setUp(self) def do_test(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py +++ packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py @@ -125,7 +125,7 @@ def inferior_asserting(self): """Inferior asserts upon launching; lldb should catch the event and stop.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -142,7 +142,7 @@ def inferior_asserting_python(self): """Inferior asserts upon launching; lldb should catch the event and stop.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -166,7 +166,7 @@ def inferior_asserting_registers(self): """Test that lldb can read registers after asserting.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -178,7 +178,7 @@ def inferior_asserting_disassemble(self): """Test that lldb can disassemble frames after asserting.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -248,7 +248,7 @@ def inferior_asserting_expr(self): """Test that the lldb expression interpreter can read symbols after asserting.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -272,7 +272,7 @@ def inferior_asserting_step(self): """Test that lldb functions correctly after stepping through a call to assert().""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py +++ packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py @@ -41,7 +41,7 @@ def inferior_crashing(self): """Inferior crashes upon launching; lldb should catch the event and stop.""" - self.exe = os.path.join(os.getcwd(), "a.out") + self.exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + self.exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) Index: packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py +++ packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py @@ -100,7 +100,7 @@ def inferior_crashing(self): """Inferior crashes upon launching; lldb should catch the event and stop.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -122,7 +122,7 @@ def inferior_crashing_python(self): """Inferior crashes upon launching; lldb should catch the event and stop.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -148,7 +148,7 @@ def inferior_crashing_registers(self): """Test that lldb can read registers after crashing.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -160,7 +160,7 @@ def inferior_crashing_expr(self): """Test that the lldb expression interpreter can read symbols after crashing.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -176,7 +176,7 @@ def inferior_crashing_step(self): """Test that lldb functions correctly after stepping through a crash.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.set_breakpoint(self.line) @@ -206,7 +206,7 @@ def inferior_crashing_step_after_break(self): """Test that lldb behaves correctly when stepping after a crash.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -231,7 +231,7 @@ def inferior_crashing_expr_step_expr(self): """Test that lldb expressions work before and after stepping after a crash.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) Index: packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py +++ packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py @@ -83,7 +83,7 @@ def recursive_inferior_crashing(self): """Inferior crashes upon launching; lldb should catch the event and stop.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -117,7 +117,7 @@ def recursive_inferior_crashing_python(self): """Inferior crashes upon launching; lldb should catch the event and stop.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -143,7 +143,7 @@ def recursive_inferior_crashing_registers(self): """Test that lldb can read registers after crashing.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -155,7 +155,7 @@ def recursive_inferior_crashing_expr(self): """Test that the lldb expression interpreter can read symbols after crashing.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -168,7 +168,7 @@ def recursive_inferior_crashing_step(self): """Test that lldb functions correctly after stepping through a crash.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.set_breakpoint(self.line) @@ -196,7 +196,7 @@ def recursive_inferior_crashing_step_after_break(self): """Test that lldb behaves correctly when stepping after a crash.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) @@ -221,7 +221,7 @@ def recursive_inferior_crashing_expr_step_expr(self): """Test that lldb expressions work before and after stepping after a crash.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) Index: packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py +++ packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py @@ -145,7 +145,7 @@ def inline_stepping(self): """Use Python APIs to test stepping over and hitting breakpoints.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -257,7 +257,7 @@ def inline_stepping_step_over(self): """Use Python APIs to test stepping over and hitting breakpoints.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -288,7 +288,7 @@ def step_in_template(self): """Use Python APIs to test stepping in to templated functions.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py +++ packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py @@ -22,7 +22,7 @@ def test_bogus_values(self): """Test that we handle inferior misusing the GDB JIT interface""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py +++ packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py @@ -25,7 +25,7 @@ @skipIfDarwinEmbedded # iOS etc don't launch the binary via a shell, so arg expansion won't happen def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("target create %s" % exe) Index: packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py +++ packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py @@ -100,12 +100,12 @@ dylibName = 'libloadunload_d.so' # The directory with the dynamic library we did not link to. - new_dir = os.path.join(os.getcwd(), "hidden") + new_dir = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "hidden") - old_dylib = os.path.join(os.getcwd(), dylibName) + old_dylib = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, dylibName) new_dylib = os.path.join(new_dir, dylibName) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.expect("target modules list", @@ -156,7 +156,7 @@ self.build() self.copy_shlibs_to_remote(hidden_dir=True) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Shut off ANSI color usage so we don't get ANSI escape sequences @@ -222,7 +222,7 @@ self.build() self.copy_shlibs_to_remote() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break at main.cpp before the call to dlopen(). @@ -300,7 +300,7 @@ self.build() self.copy_shlibs_to_remote() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break by function name a_function (not yet loaded). @@ -343,7 +343,7 @@ self.build() self.copy_shlibs_to_remote() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break by function name a_function (not yet loaded). @@ -375,7 +375,7 @@ self.build() self.copy_shlibs_to_remote() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) a_init_bp_num = lldbutil.run_break_set_by_symbol( Index: packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py +++ packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py @@ -47,7 +47,7 @@ self.step_back_out() def start_test(self, symbol): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) Index: packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py +++ packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py @@ -28,7 +28,7 @@ def test_memory_cache(self): """Test the MemoryCache class with a sequence of 'memory read' and 'memory write' operations.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break in main() after the variables are assigned values. Index: packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py +++ packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py @@ -28,7 +28,7 @@ def test_memory_find(self): """Test the 'memory find' command.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break in main() aftre the variables are assigned values. Index: packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py +++ packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py @@ -26,7 +26,7 @@ def test_memory_read(self): """Test the 'memory read' command with plain and vector formats.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break in main() aftre the variables are assigned values. Index: packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py +++ packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py @@ -33,7 +33,7 @@ @skipIf(archs=['i386']) def mtc_tests(self): # Load the test - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect("file " + exe, patterns=["Current executable set to .*a.out"]) self.runCmd("env DYLD_INSERT_LIBRARIES=%s" % self.mtc_dylib_path) Index: packages/Python/lldbsuite/test/functionalities/nested_alias/TestNestedAlias.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/nested_alias/TestNestedAlias.py +++ packages/Python/lldbsuite/test/functionalities/nested_alias/TestNestedAlias.py @@ -26,7 +26,7 @@ def test_nested_alias(self): """Test that an alias can reference other aliases without crashing.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break in main() aftre the variables are assigned values. Index: packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py +++ packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py @@ -24,7 +24,7 @@ """Test expressions of variable 'i' which appears in two for loops.""" self.build() self.exe_name = 'a.out' - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file %s" % exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/functionalities/nosucharch/TestNoSuchArch.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/nosucharch/TestNoSuchArch.py +++ packages/Python/lldbsuite/test/functionalities/nosucharch/TestNoSuchArch.py @@ -15,7 +15,7 @@ def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Check that passing an invalid arch via the command-line fails but # doesn't crash Index: packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -63,8 +63,8 @@ def test_deeper_stack_in_mini_dump(self): """Test that we can examine a more interesting stack in a mini dump.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") - core = os.path.join(os.getcwd(), "core.dmp") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") + core = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "core.dmp") try: # Set a breakpoint and capture a mini dump. target = self.dbg.CreateTarget(exe) @@ -99,8 +99,8 @@ def test_local_variables_in_mini_dump(self): """Test that we can examine local variables in a mini dump.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") - core = os.path.join(os.getcwd(), "core.dmp") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") + core = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "core.dmp") try: # Set a breakpoint and capture a mini dump. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py +++ packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py @@ -27,7 +27,7 @@ def test_attach_to_process_by_id(self): """Test attach by process id""" self.build() - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Spawn a new process popen = self.spawnSubprocess(exe) @@ -71,7 +71,7 @@ def test_attach_to_process_by_name(self): """Test attach by process name""" self.build() - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Spawn a new process popen = self.spawnSubprocess(exe) Index: packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py +++ packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py @@ -25,7 +25,7 @@ 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 = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Use a file as a synchronization point between test and inferior. pid_file_path = lldbutil.append_to_process_working_directory( Index: packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py +++ packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py @@ -26,7 +26,7 @@ @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_setpgid(self): self.build() - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') # Use a file as a synchronization point between test and inferior. pid_file_path = lldbutil.append_to_process_working_directory( Index: packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py +++ packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py @@ -33,7 +33,7 @@ def test_io(self): """Test that process launch I/O redirection flags work properly.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect("file " + exe, patterns=["Current executable set to .*a.out"]) @@ -125,14 +125,14 @@ d = {'CXX_SOURCES': 'print_cwd.cpp'} self.build(dictionary=d) self.setTearDownCleanup(d) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe) mywd = 'my_working_dir' out_file_name = "my_working_dir_test.out" err_file_name = "my_working_dir_test.err" - my_working_dir_path = os.path.join(os.getcwd(), mywd) + my_working_dir_path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, mywd) out_file_path = os.path.join(my_working_dir_path, out_file_name) err_file_path = os.path.join(my_working_dir_path, err_file_name) @@ -195,7 +195,7 @@ d = {'CXX_SOURCES': source} self.build(dictionary=d) self.setTearDownCleanup(d) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") evil_var = 'INIT*MIDDLE}TAIL' Index: packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py +++ packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py @@ -21,8 +21,8 @@ def test_cannot_save_core_unless_process_stopped(self): """Test that SaveCore fails if the process isn't stopped.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") - core = os.path.join(os.getcwd(), "core.dmp") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") + core = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "core.dmp") target = self.dbg.CreateTarget(exe) process = target.LaunchSimple( None, None, self.get_process_working_directory()) @@ -35,8 +35,8 @@ def test_save_windows_mini_dump(self): """Test that we can save a Windows mini dump.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") - core = os.path.join(os.getcwd(), "core.dmp") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") + core = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "core.dmp") try: target = self.dbg.CreateTarget(exe) breakpoint = target.BreakpointCreateByName("bar") Index: packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py +++ packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py @@ -20,7 +20,7 @@ """Test format string functionality.""" self.build() exe_name = 'a.out' - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py @@ -25,7 +25,7 @@ self.build() self.setTearDownCleanup() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py @@ -35,7 +35,7 @@ """Test Intel(R) MPX registers after running example code.""" self.line = line_number('main.cpp', '// Set a break point here.') - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line, num_expected_locations=1) Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py @@ -29,7 +29,7 @@ self.mpx_boundary_violation() def mpx_boundary_violation(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("run", RUN_SUCCEEDED) Index: packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py +++ packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py @@ -124,7 +124,7 @@ self.convenience_registers_with_process_attach(test_16bit_regs=True) def common_setup(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -149,7 +149,7 @@ self.platform = "posix" if self.platform != "": - self.log_file = os.path.join(os.getcwd(), 'TestRegisters.log') + self.log_file = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'TestRegisters.log') self.runCmd( "log enable " + self.platform + @@ -185,7 +185,7 @@ new_value]) def fp_special_purpose_register_read(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -266,7 +266,7 @@ 1 << fstat_top_pointer_initial) def fp_register_write(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -441,7 +441,7 @@ def convenience_registers_with_process_attach(self, test_16bit_regs): """Test convenience registers after a 'process attach'.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Spawn a new process pid = self.spawnSubprocess(exe, ['wait_for_attach']).pid Index: packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py +++ packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py @@ -18,7 +18,7 @@ def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("target create %s" % exe) Index: packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py +++ packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py @@ -40,7 +40,7 @@ def test_with_python(self): """Test getting return values from stepping out.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") error = lldb.SBError() self.target = self.dbg.CreateTarget(exe) @@ -189,7 +189,7 @@ @skipIfDarwinEmbedded # ABIMacOSX_arm64 doesn't get structs this big correctly def test_vector_values(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") error = lldb.SBError() self.target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py +++ packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py @@ -21,7 +21,7 @@ def test_set_data(self): """Test setting the contents of variables and registers using raw data.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("br s -p First") Index: packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py +++ packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py @@ -29,7 +29,7 @@ def test_with_run_command(self): """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py +++ packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py @@ -20,7 +20,7 @@ @skipIfDarwin def test_inferior_handle_sigsegv(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py +++ packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py @@ -58,7 +58,7 @@ def signal_test(self, signal, test_passing): """Test that we handle inferior raising signals""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -197,7 +197,7 @@ """Test that we catch a signal in the edge case where the process receives it while we are about to interrupt it""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookCmd.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookCmd.py +++ packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookCmd.py @@ -38,7 +38,7 @@ def test(self): """Test a sequence of target stop-hook commands.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py +++ packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py @@ -45,7 +45,7 @@ self.build() import pexpect - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") prompt = "(lldb) " add_prompt = "Enter your stop hook command(s). Type 'DONE' to end." add_prompt1 = "> " Index: packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py +++ packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py @@ -46,7 +46,7 @@ self.setTearDownCleanup(dictionary=self.d) import pexpect - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) prompt = "(lldb) " # So that the child gets torn down after the test. Index: packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py +++ packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py @@ -61,9 +61,9 @@ def do_target_command(self): """Exercise 'target create', 'target list', 'target select' commands.""" - exe_a = os.path.join(os.getcwd(), "a.out") - exe_b = os.path.join(os.getcwd(), "b.out") - exe_c = os.path.join(os.getcwd(), "c.out") + exe_a = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") + exe_b = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "b.out") + exe_c = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "c.out") self.runCmd("target list") output = self.res.GetOutput() Index: packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py +++ packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py @@ -30,7 +30,7 @@ """Test breakpoint handling after a thread join.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint Index: packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py +++ packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py @@ -36,7 +36,7 @@ """Test breakpoint handling after a thread join.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. Index: packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py +++ packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py @@ -26,7 +26,7 @@ def test_step_inst_with(self): """Test thread creation during step-inst handling.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target and target.IsValid(), "Target is valid") Index: packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py +++ packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py @@ -51,7 +51,7 @@ def create_after_attach(self, use_fork): """Test thread creation after process attach.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Spawn a new process if use_fork: Index: packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py +++ packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py @@ -83,7 +83,7 @@ def create_during_step_base(self, step_cmd, step_stop_reason): """Test thread creation while using step-in.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Get the target process Index: packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py +++ packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py @@ -29,7 +29,7 @@ def test(self): """Test thread exit during breakpoint handling.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. Index: packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py +++ packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py @@ -53,7 +53,7 @@ def exit_during_step_base(self, step_cmd, step_stop_reason, by_instruction): """Test thread exit during step handling.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. Index: packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py +++ packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py @@ -20,7 +20,7 @@ def test(self): """Test thread jump handling.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Find the line numbers for our breakpoints. Index: packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py +++ packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py @@ -38,7 +38,7 @@ def test(self): """Test simultaneous breakpoints in multiple threads.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. Index: packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py +++ packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py @@ -27,7 +27,7 @@ def test_number_of_threads(self): """Test number of threads.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint with 1 location. @@ -66,7 +66,7 @@ def test_unique_stacks(self): """Test backtrace unique with multiple threads executing the same stack.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Set a break point on the thread3 notify all (should get hit on threads 4-13). Index: packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py +++ packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py @@ -82,7 +82,7 @@ def thread_state_after_breakpoint_test(self): """Test thread state after breakpoint.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. @@ -122,7 +122,7 @@ def thread_state_after_continue_test(self): """Test thread state after continue.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. @@ -164,7 +164,7 @@ def thread_state_after_expression_test(self): """Test thread state after expression.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. @@ -200,7 +200,7 @@ def process_interrupt_test(self): """Test process interrupt and continue.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. @@ -240,7 +240,7 @@ def thread_states_test(self): """Test thread states (comprehensive).""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. Index: packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py +++ packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py @@ -125,7 +125,7 @@ def step_out_test(self, step_out_func): """Test single thread step out of a function.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint in the main thread. Index: packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py +++ packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py @@ -26,7 +26,7 @@ def do_until (self, args, until_lines, expected_linenum): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py +++ packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py @@ -28,7 +28,7 @@ def test(self): """Test thread exit handling.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # This should create a breakpoint with 1 location. Index: packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py +++ packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py @@ -24,7 +24,7 @@ def test_python(self): """Test that we obey thread conditioned breakpoints.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py +++ packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py @@ -28,7 +28,7 @@ def test_python(self): """Test that we obey thread conditioned breakpoints.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py +++ packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py @@ -33,7 +33,7 @@ self.line_thread2 = line_number('main.c', '// thread2 line') def tsan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py +++ packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py @@ -30,7 +30,7 @@ TestBase.setUp(self) def tsan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py +++ packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py @@ -30,7 +30,7 @@ TestBase.setUp(self) def tsan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py +++ packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py @@ -30,7 +30,7 @@ TestBase.setUp(self) def tsan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py +++ packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py @@ -26,7 +26,7 @@ self.tsan_tests() def tsan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py +++ packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py @@ -30,7 +30,7 @@ TestBase.setUp(self) def tsan_tests(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py +++ packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py @@ -35,7 +35,7 @@ @no_debug_info_test def test_launch_in_terminal(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"]) Index: packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py +++ packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py @@ -27,7 +27,7 @@ def ubsan_tests(self): # Load the test - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py +++ packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py @@ -27,7 +27,7 @@ def ubsan_tests(self): # Load the test - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect( "file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py +++ packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py @@ -23,7 +23,7 @@ self.build() self.setTearDownCleanup() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py +++ packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py @@ -25,7 +25,7 @@ self.build() self.setTearDownCleanup() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py +++ packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py @@ -25,7 +25,7 @@ self.build() self.setTearDownCleanup() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py +++ packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py @@ -84,7 +84,7 @@ else: self.skipTest("No expectations for the current architecture") - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py @@ -46,7 +46,7 @@ """Test watching a location with '-s size' option.""" self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py @@ -40,7 +40,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py @@ -37,7 +37,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Detect line number after which we are going to increment arrayName. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py @@ -24,7 +24,7 @@ @skipIf(bugnumber="llvm.org/pr30758", oslist=["linux"], archs=["arm", "aarch64"]) def test(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target and target.IsValid(), VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py @@ -29,7 +29,7 @@ def test(self): """Test stepping over watchpoints.""" self.build() - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py @@ -42,7 +42,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped in main. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py @@ -46,7 +46,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. @@ -117,7 +117,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. @@ -174,7 +174,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. @@ -234,7 +234,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. @@ -304,7 +304,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py @@ -45,7 +45,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. @@ -113,7 +113,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py @@ -46,7 +46,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. @@ -116,7 +116,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. @@ -144,7 +144,7 @@ (self.source, self.decl)]) - cmd_script_file = os.path.join(os.getcwd(), "watchpoint_command.py") + cmd_script_file = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "watchpoint_command.py") self.runCmd("command script import '%s'" % (cmd_script_file)) self.runCmd( Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py @@ -45,7 +45,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py @@ -37,7 +37,7 @@ exe = 'a.out' - exe = os.path.join(os.getcwd(), exe) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe) main_file_spec = lldb.SBFileSpec("main.c") # Create a target by the debugger. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py @@ -33,7 +33,7 @@ """Test that adding, deleting and modifying watchpoints sends the appropriate events.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py @@ -36,7 +36,7 @@ def value_of_vector_variable_with_watchpoint_set(self): """Test verify displayed value of vector variable""" - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Set break to get a frame Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py @@ -44,7 +44,7 @@ self.build() self.setTearDownCleanup() - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py @@ -33,7 +33,7 @@ self.build() self.setTearDownCleanup() - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. Index: packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py +++ packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py @@ -62,7 +62,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Detect line number after which we are going to increment arrayName. Index: packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py +++ packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py @@ -88,7 +88,7 @@ self.dbg.SetAsync(False) # Create a target - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -150,7 +150,7 @@ self.dbg.SetAsync(False) # Create a target - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py +++ packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py @@ -24,7 +24,7 @@ def test_and_run_command(self): """Test 'frame variable var_name' on some variables with array types.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( @@ -85,7 +85,7 @@ def test_and_python_api(self): """Use Python APIs to inspect variables with array types.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -27,7 +27,7 @@ def test_and_run_command(self): """Test 'frame variable ...' on a variable with bitfields.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the main. @@ -123,7 +123,7 @@ def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py +++ packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py @@ -26,7 +26,7 @@ def launch_common(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.is_started = False Index: packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py +++ packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py @@ -25,7 +25,7 @@ def test_conflicting_symbols(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget("a.out") self.assertTrue(target, VALID_TARGET) @@ -96,7 +96,7 @@ @expectedFailureAll(bugnumber="llvm.org/pr35043") def test_shadowed(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget("a.out") self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py +++ packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py @@ -38,7 +38,7 @@ def test_and_run_command(self): """Test interpreted and JITted expressions on constant values.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the main. Index: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py +++ packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py @@ -24,7 +24,7 @@ def test(self): """Test 'image lookup -t days' and check for correct display and enum value printing.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the main. Index: packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py +++ packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py @@ -33,7 +33,7 @@ def do_test(self): """Make sure FindTypes actually finds 'struct typename' not just 'typename'.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py +++ packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py @@ -17,7 +17,7 @@ def test_and_run_command(self): """Display *bar_ptr when stopped on a function with forward declaration of struct bar.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py +++ packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py @@ -66,7 +66,7 @@ startstr='(int) $2 = 12') def runToBreakpoint(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the main. Index: packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py +++ packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py @@ -28,7 +28,7 @@ @skipIf(macos_version=["<", "10.12"]) def test_expr(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py +++ packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py @@ -114,7 +114,7 @@ register_variables_count = 0 self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the main. Index: packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py +++ packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py @@ -28,7 +28,7 @@ def test(self): """Test settings and readings of program variables.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Set breakpoints on several places to set program variables. Index: packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py +++ packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py @@ -24,7 +24,7 @@ @add_test_categories(['pyapi']) def get_to_start(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py +++ packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py @@ -28,7 +28,7 @@ def test_and_python_api(self): """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py +++ packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py @@ -34,7 +34,7 @@ def test_step_out_with_run_command(self): """Exercise thread step-out and frame select followed by thread step-out.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Create a breakpoint inside function 'c'. Index: packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py +++ packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py @@ -48,7 +48,7 @@ def test(self): """Test thread-local storage.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) if self.platformIsDarwin(): self.registerSharedLibrariesWithTarget(target, ['liba.dylib']) Index: packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py +++ packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py @@ -26,7 +26,7 @@ def image_lookup_for_multiple_typedefs(self): """Test 'image lookup -t a' at different scopes and check for correct display.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) typearray = ( "float", Index: packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py =================================================================== --- packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py +++ packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py @@ -47,7 +47,7 @@ self.assertTrue(self.src_file_spec.IsValid(), "breakpoint file") # Get the path of the executable - exe_path = os.path.join(cwd, 'a.out') + exe_path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], 'a.out') # Load the executable self.target = self.dbg.CreateTarget(exe_path) Index: packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py +++ packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py @@ -35,7 +35,7 @@ """Test a sequence of breakpoint command add, list, and delete.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py +++ packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py @@ -32,7 +32,7 @@ def test(self): """Test that the C++11 support for char16_t and char32_t works correctly.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py +++ packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py @@ -67,7 +67,7 @@ def test_with_python_api(self): """Test Python APIs on file and class static variables.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py +++ packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py @@ -24,7 +24,7 @@ def test_with_run_command(self): """Test 'frame variable this' when stopped on a class constructor.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break on the ctor function of class C. @@ -61,7 +61,7 @@ def test_with_python_api(self): """Use Python APIs to create a breakpoint by (filespec, line).""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -119,7 +119,7 @@ def test_with_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # rdar://problem/8516141 @@ -176,7 +176,7 @@ def test_with_constructor_name(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py +++ packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py @@ -78,7 +78,7 @@ def breakOnCtor(self): """Setup/run the program so it stops on C's constructor.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break on the ctor function of class C. Index: packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py +++ packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py @@ -13,7 +13,7 @@ def test_with_run_command(self): """Test that virtual base classes work in when SBValue objects are used to explore the variable value""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py +++ packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py @@ -51,7 +51,7 @@ def do_sbvalue_cast(self, exe_name): """Test SBValue::Cast(SBType) API for C++ types.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py +++ packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py @@ -37,7 +37,7 @@ def test_get_dynamic_vals(self): """Test fetching C++ dynamic values from pointers & references.""" self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py +++ packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py @@ -78,7 +78,7 @@ def image_lookup_for_enum_type(self): """Test C++11 enumeration class types.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the main. Index: packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py +++ packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py @@ -30,7 +30,7 @@ def test(self): """Test lldb exception breakpoint command for CPP.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py +++ packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py @@ -39,7 +39,7 @@ startstr='(int) $0 =') def runToBreakpoint(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the main. Index: packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py +++ packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py @@ -31,7 +31,7 @@ "A::func(int)"] # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) module_list = lldb.SBFileSpecList() @@ -56,7 +56,7 @@ names = ["func()", "func(int)"] # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) module_list = lldb.SBFileSpecList() @@ -81,7 +81,7 @@ names = ["A::func()", "A::func(int)"] # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) module_list = lldb.SBFileSpecList() Index: packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py +++ packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py @@ -30,7 +30,7 @@ def test(self): """Test some expressions involving STL data types.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # The following two lines, if uncommented, will enable loggings. #self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res) @@ -78,7 +78,7 @@ def test_SBType_template_aspects(self): """Test APIs for getting template arguments from an SBType.""" self.build() - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py +++ packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py @@ -31,7 +31,7 @@ def test_stdcxx_disasm(self): """Do 'disassemble' on each and every 'Code' symbol entry from the std c++ lib.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # rdar://problem/8543077 Index: packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py +++ packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py @@ -19,7 +19,7 @@ self.build() # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py +++ packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py @@ -69,7 +69,7 @@ self.skipTest( "Skipping because this test is known to crash on i386") - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py +++ packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py @@ -33,7 +33,7 @@ self.skipTest( "rdar://problem/9173060 lldb hangs while running unique-types for clang version < 3") - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True) Index: packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py +++ packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py @@ -27,7 +27,7 @@ def test(self): """Test that variables with unsigned types display correctly.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # GCC puts a breakpoint on the last line of a multi-line expression, so Index: packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py =================================================================== --- packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py +++ packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py @@ -28,7 +28,7 @@ def test(self): """Test that C++ supports wchar_t correctly.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/go/expressions/TestExpressions.py =================================================================== --- packages/Python/lldbsuite/test/lang/go/expressions/TestExpressions.py +++ packages/Python/lldbsuite/test/lang/go/expressions/TestExpressions.py @@ -40,7 +40,7 @@ self.assertEqual(size, t.size) def launchProcess(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py =================================================================== --- packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py +++ packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py @@ -31,7 +31,7 @@ self.break_line = line_number(self.main_source, '// stop here') def launchProcess(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/go/goroutines/TestGoroutines.py =================================================================== --- packages/Python/lldbsuite/test/lang/go/goroutines/TestGoroutines.py +++ packages/Python/lldbsuite/test/lang/go/goroutines/TestGoroutines.py @@ -36,7 +36,7 @@ self.break_line3 = line_number(self.main_source, '// stop3') def launchProcess(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/go/types/TestGoASTContext.py =================================================================== --- packages/Python/lldbsuite/test/lang/go/types/TestGoASTContext.py +++ packages/Python/lldbsuite/test/lang/go/types/TestGoASTContext.py @@ -46,7 +46,7 @@ self.assertEqual(size, t.size) def launchProcess(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py =================================================================== --- packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py +++ packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py @@ -17,7 +17,7 @@ def test_language_of_frame(self): """Test that the language defaults to the language of the current frame.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Execute the cleanup function during test case tear down Index: packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py +++ packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py @@ -31,7 +31,7 @@ def test_with_python_api(self): """Test printing the ivars of the self when captured in blocks""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py +++ packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py @@ -46,7 +46,7 @@ "42"]) def common_setup(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.registerSharedLibrariesWithTarget(target, self.shlib_names) Index: packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py +++ packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py @@ -32,7 +32,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(self.d) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py +++ packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py @@ -35,7 +35,7 @@ def test_break(self): """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Stop at +[NSString stringWithFormat:]. @@ -117,7 +117,7 @@ def test_data_type_and_expr(self): """Lookup objective-c data types and evaluate expressions.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Stop at -[MyString description]. @@ -230,7 +230,7 @@ self.build() # See: lldb needs to use the ObjC runtime symbols for ivar offsets # Only fails for the ObjC 2.0 runtime. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -280,7 +280,7 @@ def test_expression_lookups_objc(self): """Test running an expression detect spurious debug info lookups (DWARF).""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Stop at -[MyString initWithNSString:]. Index: packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py +++ packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py @@ -47,7 +47,7 @@ def test_more_expr_commands(self): """More expression commands for objective-c.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Create a bunch of breakpoints. @@ -84,7 +84,7 @@ def test_NSArray_expr_commands(self): """Test expression commands for NSArray.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside Test_NSArray: @@ -111,7 +111,7 @@ def test_NSString_expr_commands(self): """Test expression commands for NSString.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside Test_NSString: @@ -141,7 +141,7 @@ def test_MyString_dump_with_runtime(self): """Test dump of a known Objective-C object by dereferencing it.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) line = self.lines[4] @@ -162,7 +162,7 @@ def test_runtime_types(self): """Test commands that require runtime types""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside Test_NSString: @@ -190,7 +190,7 @@ def test_NSError_p(self): """Test that p of the result of an unknown method does require a cast.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) line = self.lines[4] Index: packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py +++ packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py @@ -34,7 +34,7 @@ d = {'EXE': 'b.out'} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), 'b.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'b.out') # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py +++ packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py @@ -28,7 +28,7 @@ self.skipTest("This only applies to the v2 runtime") self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Stop at -[MyString description]. Index: packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py +++ packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py @@ -36,7 +36,7 @@ def test_with_python_api(self): """Test symbol table access with Python APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py +++ packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py @@ -25,7 +25,7 @@ def test_with_python_api(self): """Test that a global ObjC object found before the process is started updates correctly.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py +++ packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py @@ -109,7 +109,7 @@ None, environment, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py +++ packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py @@ -35,7 +35,7 @@ def test_imp_ivar_type(self): """Test that dynamically discovered ivars of type IMP do not crash LLDB""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py +++ packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py @@ -29,7 +29,7 @@ @skipIf(macos_version=["<", "10.12"]) def test_expr(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py +++ packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py @@ -27,7 +27,7 @@ @skipIf(macos_version=["<", "10.12"]) def test_expr(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py +++ packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py @@ -30,7 +30,7 @@ @skipIf(macos_version=["<", "10.12"]) def test_expr(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py +++ packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py @@ -33,7 +33,7 @@ return self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py +++ packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py @@ -24,7 +24,7 @@ self.skipTest("requires Objective-C 2.0 runtime") self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_source_regexp( Index: packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py +++ packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py @@ -33,7 +33,7 @@ self.skipTest("Dynamic types for ObjC V1 runtime not implemented") self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py +++ packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py @@ -29,7 +29,7 @@ def test_with_python_api(self): """Test expression parser respect for ObjC built-in types.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py +++ packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py @@ -33,7 +33,7 @@ self.skipTest("requires Objective-C 2.0 runtime") self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py +++ packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py @@ -28,7 +28,7 @@ def test_with_python_api(self): """Test calling functions in class methods.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py +++ packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py @@ -34,7 +34,7 @@ self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py +++ packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py @@ -43,7 +43,7 @@ self.skipTest("Dynamic types for ObjC V1 runtime not implemented") self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py +++ packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py @@ -28,7 +28,7 @@ def test_with_python_api(self): """Test printing ObjC objects that use unbacked properties""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py +++ packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py @@ -31,7 +31,7 @@ def test_with_python_api(self): """Test that we can find stripped Objective-C ivars in the runtime""" self.build() - exe = os.path.join(os.getcwd(), "a.out.stripped") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out.stripped") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py +++ packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py @@ -28,7 +28,7 @@ def runToBreakpoint(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py +++ packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py @@ -34,7 +34,7 @@ def test_break(self): """Test 'expr member' continues to work for optimized build.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_symbol( Index: packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py +++ packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py @@ -33,7 +33,7 @@ self.skipTest("requires modern objc runtime") self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target from the debugger. Index: packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py +++ packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py @@ -34,7 +34,7 @@ if self.getArchitecture() == 'i386': self.skipTest("requires modern objc runtime") self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py +++ packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py @@ -29,7 +29,7 @@ def test_with_python_api(self): """Test calling functions in static methods.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py +++ packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py @@ -36,7 +36,7 @@ def test_with_python_api(self): """Test stepping through ObjC method dispatch in various forms.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py +++ packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py @@ -29,7 +29,7 @@ def test_with_python_api(self): """Test passing structs to Objective-C methods.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py +++ packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py @@ -28,7 +28,7 @@ def test_with_python_api(self): """Test calling functions in class methods.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py +++ packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py @@ -28,7 +28,7 @@ def test_with_python_api(self): """Test calling methods on super.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py +++ packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py @@ -38,7 +38,7 @@ d = {'EXE': 'b.out'} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), 'b.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'b.out') target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py +++ packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py @@ -20,7 +20,7 @@ """Test the ptr_refs tool on Darwin with Objective-C""" self.build() exe_name = 'a.out' - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py +++ packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py @@ -33,7 +33,7 @@ self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py +++ packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py @@ -33,7 +33,7 @@ self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py +++ packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py @@ -33,7 +33,7 @@ self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py +++ packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py @@ -33,7 +33,7 @@ self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py +++ packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py @@ -92,7 +92,7 @@ "foo->_bar->_hidden_ivar = 0x"]) def common_setup(self): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py =================================================================== --- packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py +++ packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py @@ -30,7 +30,7 @@ @expectedFailureAll(oslist=['watchos'], bugnumber="rdar://problem/34642736") # bug in NSDictionary formatting on watchos def test_single_entry_dict(self): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Break inside the foo function which takes a bar_ptr argument. Index: packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py =================================================================== --- packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py +++ packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py @@ -23,7 +23,7 @@ even if gnu.build-id and gnu_debuglink are not present in the module. Similar to test_add_dsym_mid_execution test for macos.""" self.build(clean=True) - exe = os.path.join(os.getcwd(), "stripped.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "stripped.out") self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) Index: packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py =================================================================== --- packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py +++ packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py @@ -26,7 +26,7 @@ bugnumber="llvm.org/pr24737") def test_step_inst(self): self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target and target.IsValid(), "Target is valid") Index: packages/Python/lldbsuite/test/lldbinline.py =================================================================== --- packages/Python/lldbsuite/test/lldbinline.py +++ packages/Python/lldbsuite/test/lldbinline.py @@ -167,7 +167,7 @@ def do_test(self): exe_name = "a.out" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) source_files = [f for f in os.listdir(os.getcwd()) if source_type(f)] target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- packages/Python/lldbsuite/test/lldbtest.py +++ packages/Python/lldbsuite/test/lldbtest.py @@ -1822,7 +1822,7 @@ def generateSource(self, source): template = source + '.template' - temp = os.path.join(os.getcwd(), template) + temp = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, template) with open(temp, 'r') as f: content = f.read() @@ -1841,7 +1841,7 @@ header.startswith("SB") and header.endswith(".h"))] includes = '\n'.join(list) new_content = content.replace('%include_SB_APIs%', includes) - src = os.path.join(os.getcwd(), source) + src = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, source) with open(src, 'w') as f: f.write(new_content) @@ -1907,7 +1907,7 @@ local_shlib_path = os.path.join( os.getcwd(), name + shlib_extension) if not os.path.exists(local_shlib_path): - local_shlib_path = os.path.join(os.getcwd(), name) + local_shlib_path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, name) # Make sure we found the local shared library in the above code self.assertTrue(os.path.exists(local_shlib_path)) Index: packages/Python/lldbsuite/test/lldbutil.py =================================================================== --- packages/Python/lldbsuite/test/lldbutil.py +++ packages/Python/lldbsuite/test/lldbutil.py @@ -737,7 +737,7 @@ If successful it returns a tuple with the target process and thread that hit the breakpoint.""" if in_cwd: - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Create the target target = test.dbg.CreateTarget(exe) @@ -1199,7 +1199,7 @@ remote = lldb.remote_platform if remote: return join_remote_paths(remote.GetWorkingDirectory(), *paths) - return os.path.join(os.getcwd(), *paths) + return os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, *paths) # ================================================== # Utility functions to get the correct signal number Index: packages/Python/lldbsuite/test/logging/TestLogging.py =================================================================== --- packages/Python/lldbsuite/test/logging/TestLogging.py +++ packages/Python/lldbsuite/test/logging/TestLogging.py @@ -34,7 +34,7 @@ self.command_log_tests("dwarf") def command_log_tests(self, type): - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.expect("file " + exe, patterns=["Current executable set to .*a.out"]) Index: packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py =================================================================== --- packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py +++ packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py @@ -26,7 +26,7 @@ def test_add_dsym_mid_execution(self): """Test that add-dsym mid-execution loads the symbols at the right place for a slid binary.""" self.buildDsym(clean=True) - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) Index: packages/Python/lldbsuite/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py =================================================================== --- packages/Python/lldbsuite/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py +++ packages/Python/lldbsuite/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py @@ -31,7 +31,7 @@ exe = os.path.join(os.getcwd(), "a.out.dSYM/Contents/Resources/DWARF/a.out") else: - exe = os.path.join(os.getcwd(), "main.o") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "main.o") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py =================================================================== --- packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py +++ packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py @@ -37,7 +37,7 @@ def test_attach_and_check_dsyms(self): """Test attach to binary, see if the bundle dSYM is found""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) self.build() popen = self.spawnSubprocess(exe) self.addTearDownHook(self.cleanupSubprocesses) Index: packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py =================================================================== --- packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py +++ packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py @@ -37,7 +37,7 @@ def test_attach_and_check_dsyms(self): """Test attach to binary, see if the framework dSYM is found""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) self.build() popen = self.spawnSubprocess(exe) self.addTearDownHook(self.cleanupSubprocesses) Index: packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py =================================================================== --- packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py +++ packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py @@ -26,14 +26,14 @@ def test_with_python_api(self): """Test stepping and setting breakpoints in indirect and re-exported symbols.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) if self.platformIsDarwin(): - lib1 = os.path.join(os.getcwd(), 'libindirect.dylib') - lib2 = os.path.join(os.getcwd(), 'libreexport.dylib') + lib1 = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'libindirect.dylib') + lib2 = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'libreexport.dylib') self.registerSharedLibrariesWithTarget(target, [lib1, lib2]) self.main_source_spec = lldb.SBFileSpec(self.main_source) Index: packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py =================================================================== --- packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py +++ packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py @@ -111,7 +111,7 @@ self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) self.run_lldb_to_breakpoint(exe, self.source, self.line, settings_commands=settings_commands) self.expect_prompt() Index: packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py =================================================================== --- packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py +++ packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py @@ -22,7 +22,7 @@ def test(self): """Test debug symbols follow the correct order by the order file.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Test that the debug symbols have Function f3 before Function f1. Index: packages/Python/lldbsuite/test/macosx/queues/TestQueues.py =================================================================== --- packages/Python/lldbsuite/test/macosx/queues/TestQueues.py +++ packages/Python/lldbsuite/test/macosx/queues/TestQueues.py @@ -105,7 +105,7 @@ def queues(self): """Test queues inspection SB APIs without libBacktraceRecording.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -246,7 +246,7 @@ def queues_with_libBacktraceRecording(self): """Test queues inspection SB APIs with libBacktraceRecording present.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") if not os.path.isfile( '/Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib'): Index: packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py =================================================================== --- packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py +++ packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py @@ -26,7 +26,7 @@ def test_with_python_api(self): """Test function call thread safety.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py =================================================================== --- packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py +++ packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py @@ -23,7 +23,7 @@ def test_with_python_api(self): """Test that we get thread names when interrupting a process.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py =================================================================== --- packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py +++ packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py @@ -33,7 +33,7 @@ self.build() # Note that "testit" is a universal binary. - exe = os.path.join(os.getcwd(), "testit") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "testit") # Create a target by the debugger. target = self.dbg.CreateTargetWithFileAndTargetTriple( @@ -57,7 +57,7 @@ self.build() # Note that "testit" is a universal binary. - exe = os.path.join(os.getcwd(), "testit") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "testit") # By default, x86_64 is assumed if no architecture is specified. self.expect("file " + exe, CURRENT_EXECUTABLE_SET, @@ -130,7 +130,7 @@ self.build() # Note that "testit" is a universal binary. - exe = os.path.join(os.getcwd(), "testit") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "testit") # Create a target by the debugger. target = self.dbg.CreateTargetWithFileAndTargetTriple( Index: packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py +++ packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py @@ -23,7 +23,7 @@ def test_breakpoint_is_valid(self): """Make sure that if an SBBreakpoint gets deleted its IsValid returns false.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -57,7 +57,7 @@ Breakpoint's IsValid returns false.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py =================================================================== --- packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py +++ packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py @@ -34,7 +34,7 @@ d = {'EXE': self.exe_name} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/event/TestEvents.py =================================================================== --- packages/Python/lldbsuite/test/python_api/event/TestEvents.py +++ packages/Python/lldbsuite/test/python_api/event/TestEvents.py @@ -33,7 +33,7 @@ def test_listen_for_and_print_event(self): """Exercise SBEvent API.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.dbg.SetAsync(True) @@ -122,7 +122,7 @@ def test_wait_for_event(self): """Exercise SBListener.WaitForEvent() API.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.dbg.SetAsync(True) @@ -201,7 +201,7 @@ def test_add_listener_to_broadcaster(self): """Exercise some SBBroadcaster APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.dbg.SetAsync(True) Index: packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py =================================================================== --- packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py +++ packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py @@ -23,7 +23,7 @@ self.setTearDownCleanup() exe_name = "a.out" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Create the target target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/frame/TestFrames.py =================================================================== --- packages/Python/lldbsuite/test/python_api/frame/TestFrames.py +++ packages/Python/lldbsuite/test/python_api/frame/TestFrames.py @@ -24,7 +24,7 @@ def test_get_arg_vals_for_call_stack(self): """Exercise SBFrame.GetVariables() API to get argument vals.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -127,7 +127,7 @@ def test_frame_api_boundary_condition(self): """Exercise SBFrame APIs with boundary condition inputs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -169,7 +169,7 @@ def test_frame_api_IsEqual(self): """Exercise SBFrame API IsEqual.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py =================================================================== --- packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py +++ packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py @@ -51,7 +51,7 @@ self.dbg.SetAsync(False) # Create a target by the debugger. - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py =================================================================== --- packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py +++ packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py @@ -32,7 +32,7 @@ def test_stop_at_outer_inline(self): """Exercise SBFrame.IsInlined() and SBFrame.GetFunctionName().""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py +++ packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py @@ -31,7 +31,7 @@ def test(self): """Exercise getting SBAddress objects, disassembly, and SBAddress APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py +++ packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py @@ -31,7 +31,7 @@ def test(self): """Exercise some SBSymbol and SBAddress APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py =================================================================== --- packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py +++ packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py @@ -21,7 +21,7 @@ # Call super's setUp(). TestBase.setUp(self) # Get the full path to our executable to be attached/debugged. - self.exe = os.path.join(os.getcwd(), self.testMethodName) + self.exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.testMethodName) self.d = {'EXE': self.testMethodName} # Find a couple of the line numbers within main.c. self.line1 = line_number('main.c', '// Set break point at this line.') Index: packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py +++ packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py @@ -24,7 +24,7 @@ def test_with_process_launch_api(self): """Test the SBCommandInterpreter APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py =================================================================== --- packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py +++ packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py @@ -27,7 +27,7 @@ def test_frame_utils(self): """Test utility functions for the frame object.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py =================================================================== --- packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py +++ packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py @@ -30,7 +30,7 @@ def test_lldb_iter_module(self): """Test module_iter works correctly for SBTarget -> SBModule.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -66,7 +66,7 @@ def test_lldb_iter_breakpoint(self): """Test breakpoint_iter works correctly for SBTarget -> SBBreakpoint.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -98,7 +98,7 @@ def test_lldb_iter_frame(self): """Test iterator works correctly for SBProcess->SBThread->SBFrame.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py =================================================================== --- packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py +++ packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py @@ -30,7 +30,7 @@ def test_iter_registers(self): """Test iterator works correctly for lldbutil.iter_registers().""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py =================================================================== --- packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py +++ packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py @@ -37,7 +37,7 @@ def test_stack_traces(self): """Test SBprocess and SBThread APIs with printing of the stack traces.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py =================================================================== --- packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py +++ packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py @@ -26,7 +26,7 @@ def test_module_and_section(self): """Test module and section APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -77,7 +77,7 @@ def test_module_and_section_boundary_condition(self): """Test module and section APIs by passing None when it expects a Python string.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -118,7 +118,7 @@ def test_module_compile_unit_iter(self): """Test module's compile unit iterator APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py =================================================================== --- packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py +++ packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py @@ -28,7 +28,7 @@ and that using a function basename with eFunctionNameTypeFull works for all C++ functions that are at the global namespace level.""" self.build(); - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py =================================================================== --- packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py +++ packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py @@ -28,7 +28,7 @@ def test(self): """Test SBType for ObjC classes.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py +++ packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py @@ -29,7 +29,7 @@ def test_read_memory(self): """Test Python SBProcess.ReadMemory() API.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -127,7 +127,7 @@ def test_write_memory(self): """Test Python SBProcess.WriteMemory() API.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -186,7 +186,7 @@ def test_access_my_int(self): """Test access 'my_int' using Python SBProcess.GetByteOrder() and other APIs.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -284,7 +284,7 @@ def test_remote_launch(self): """Test SBProcess.RemoteLaunch() API with a process not in eStateConnected, and it should fail.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -308,7 +308,7 @@ def test_get_num_supported_hardware_watchpoints(self): """Test SBProcess.GetNumSupportedHardwareWatchpoints() API with a process.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) target = self.dbg.CreateTarget(exe) @@ -331,7 +331,7 @@ def test_get_process_info(self): """Test SBProcess::GetProcessInfo() API with a locally launched process.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py =================================================================== --- packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py +++ packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py @@ -20,10 +20,10 @@ # Call super's setUp(). TestBase.setUp(self) # Get the full path to our executable to be debugged. - self.exe = os.path.join(os.getcwd(), "process_io") - self.local_input_file = os.path.join(os.getcwd(), "input.txt") - self.local_output_file = os.path.join(os.getcwd(), "output.txt") - self.local_error_file = os.path.join(os.getcwd(), "error.txt") + self.exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "process_io") + self.local_input_file = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "input.txt") + self.local_output_file = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "output.txt") + self.local_error_file = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "error.txt") self.input_file = os.path.join( self.get_process_working_directory(), "input.txt") Index: packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py =================================================================== --- packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py +++ packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py @@ -21,7 +21,7 @@ self.main_source = "main.c" self.main_source_spec = lldb.SBFileSpec(self.main_source) - self.exe = os.path.join(os.getcwd(), "read-mem-cstring") + self.exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "read-mem-cstring") (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, 'breakpoint here', self.main_source_spec, None, self.exe) Index: packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py +++ packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py @@ -19,7 +19,7 @@ d = {'EXE': 'b.out'} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), 'b.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'b.out') target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py +++ packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py @@ -22,7 +22,7 @@ def test_ignore_signal(self): """Test Python SBUnixSignals.Suppress/Stop/Notify() API.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py =================================================================== --- packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py +++ packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py @@ -31,7 +31,7 @@ def test(self): """Exercise SBSymbolContext API extensively.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py =================================================================== --- packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py +++ packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py @@ -21,7 +21,7 @@ def test_lookup_by_address(self): """Test lookup by address in a module with multiple compilation units""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -44,7 +44,7 @@ """This test verifies that we correctly handle the case when multiple compile unit contains DW_AT_ranges and DW_AT_ranges_base attributes.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py +++ packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py @@ -149,7 +149,7 @@ self.assertEqual(len(content), 1) def create_simple_target(self, fn): - exe = os.path.join(os.getcwd(), fn) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, fn) target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) return target @@ -175,7 +175,7 @@ def find_global_variables(self, exe_name): """Exercise SBTaget.FindGlobalVariables() API.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -227,7 +227,7 @@ def find_functions(self, exe_name): """Exercise SBTaget.FindFunctions() API.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -243,7 +243,7 @@ def get_description(self): """Exercise SBTaget.GetDescription() API.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -271,7 +271,7 @@ @not_remote_testsuite_ready def launch_new_process_and_redirect_stdout(self): """Exercise SBTaget.Launch() API with redirected stdout.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -333,7 +333,7 @@ def resolve_symbol_context_with_address(self): """Exercise SBTaget.ResolveSymbolContextForAddress() API.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py +++ packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py @@ -78,7 +78,7 @@ def get_process(self): """Test Python SBThread.GetProcess() API.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -105,7 +105,7 @@ def get_stop_description(self): """Test Python SBThread.GetStopDescription() API.""" - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -134,7 +134,7 @@ def step_out_of_malloc_into_function_b(self, exe_name): """Test Python SBThread.StepOut() API to step out of a malloc call where the call site is at function b().""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -181,7 +181,7 @@ def step_over_3_times(self, exe_name): """Test Python SBThread.StepOver() API.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -227,7 +227,7 @@ def run_to_address(self, exe_name): """Test Python SBThread.RunToAddress() API.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, exe_name) target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) Index: packages/Python/lldbsuite/test/python_api/type/TestTypeList.py =================================================================== --- packages/Python/lldbsuite/test/python_api/type/TestTypeList.py +++ packages/Python/lldbsuite/test/python_api/type/TestTypeList.py @@ -34,7 +34,7 @@ d = {'EXE': self.exe_name} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py +++ packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py @@ -33,7 +33,7 @@ d = {'EXE': self.exe_name} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py +++ packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py @@ -38,7 +38,7 @@ d = {'EXE': self.exe_name} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py =================================================================== --- packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py +++ packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py @@ -15,7 +15,7 @@ @add_test_categories(['pyapi']) def test(self): self.build() - exe = os.path.join(os.getcwd(), 'a.out') + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, 'a.out') line = line_number('main.cpp', '// Break at this line') # Create a target by the debugger. Index: packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py =================================================================== --- packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py +++ packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py @@ -36,7 +36,7 @@ d = {'EXE': self.exe_name} self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py =================================================================== --- packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py +++ packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py @@ -21,7 +21,7 @@ # Call super's setUp(). TestBase.setUp(self) # Get the full path to our executable to be attached/debugged. - self.exe = os.path.join(os.getcwd(), self.testMethodName) + self.exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.testMethodName) self.d = {'EXE': self.testMethodName} @add_test_categories(['pyapi']) Index: packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py =================================================================== --- packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py +++ packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py @@ -36,7 +36,7 @@ def test_watch_val(self): """Exercise SBValue.Watch() API to set a watchpoint.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py =================================================================== --- packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -36,7 +36,7 @@ def test_set_watch_ignore_count(self): """Test SBWatchpoint.SetIgnoreCount() API.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py =================================================================== --- packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py +++ packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py @@ -39,7 +39,7 @@ def test_watch_iter(self): """Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpoints.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py =================================================================== --- packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py +++ packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py @@ -42,7 +42,7 @@ """Test watchpoint condition API.""" self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.exe_name) # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py =================================================================== --- packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py +++ packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py @@ -37,7 +37,7 @@ def test_watch_location(self): """Exercise SBValue.WatchPointee() API to set a watchpoint.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py =================================================================== --- packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -36,7 +36,7 @@ def test_watch_address(self): """Exercise SBTarget.WatchAddress() API to set a watchpoint.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) @@ -112,7 +112,7 @@ def test_watch_address_with_invalid_watch_size(self): """Exercise SBTarget.WatchAddress() API but pass an invalid watch_size.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) Index: packages/Python/lldbsuite/test/settings/TestSettings.py =================================================================== --- packages/Python/lldbsuite/test/settings/TestSettings.py +++ packages/Python/lldbsuite/test/settings/TestSettings.py @@ -125,7 +125,7 @@ """Test that 'set frame-format' with a backtick char in the format string works as well as fullpath.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) def cleanup(): @@ -161,7 +161,7 @@ """Test that after 'set auto-confirm true', manual confirmation should not kick in.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("settings set auto-confirm true") @@ -186,7 +186,7 @@ """Test that user options for the disassembler take effect.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # AT&T syntax @@ -219,7 +219,7 @@ def test_run_args_and_env_vars(self): """Test that run-args and env-vars are passed to the launched process.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Set the run-args and the env-vars. @@ -253,7 +253,7 @@ """Test that the host env vars are passed to the launched process.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # By default, inherit-env is 'true'. @@ -292,7 +292,7 @@ """Test that setting target.error/output-path for the launched process works.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Set the error-path and output-path and verify both are set. @@ -421,8 +421,8 @@ startstr='target.arg0 (string) = "cde"') self.runCmd("settings clear target.arg0", check=False) # file - path1 = os.path.join(os.getcwd(), "path1.txt") - path2 = os.path.join(os.getcwd(), "path2.txt") + path1 = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "path1.txt") + path2 = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "path2.txt") self.runCmd( "settings set target.output-path %s" % path1) # Set to known value Index: packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py =================================================================== --- packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py +++ packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py @@ -79,7 +79,7 @@ to stdout. Compare the stdout with args_out.""" self.buildDefault() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.runCmd("process launch -- " + args_in) Index: packages/Python/lldbsuite/test/source-manager/TestSourceManager.py =================================================================== --- packages/Python/lldbsuite/test/source-manager/TestSourceManager.py +++ packages/Python/lldbsuite/test/source-manager/TestSourceManager.py @@ -50,7 +50,7 @@ def do_display_source_python_api(self, use_color, column_marker_regex): self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) target = self.dbg.CreateTarget(exe) @@ -116,7 +116,7 @@ def test_move_and_then_display_source(self): """Test that target.source-map settings work by moving main.c to hidden/main.c.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Move main.c to hidden/main.c. @@ -140,10 +140,10 @@ # Set target.source-map settings. self.runCmd("settings set target.source-map %s %s" % - (os.getcwd(), os.path.join(os.getcwd(), "hidden"))) + (os.getcwd(), os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "hidden"))) # And verify that the settings work. self.expect("settings show target.source-map", - substrs=[os.getcwd(), os.path.join(os.getcwd(), "hidden")]) + substrs=[os.getcwd(), os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "hidden")]) # Display main() and verify that the source mapping has been kicked in. self.expect("source list -n main", SOURCE_DISPLAYED_CORRECTLY, @@ -152,7 +152,7 @@ def test_modify_source_file_while_debugging(self): """Modify a source file while debugging the executable.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( @@ -235,10 +235,10 @@ def test_set_breakpoint_with_absolute_path(self): self.build() self.runCmd("settings set target.source-map %s %s" % - (os.getcwd(), os.path.join(os.getcwd(), "hidden"))) + (os.getcwd(), os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "hidden"))) - exe = os.path.join(os.getcwd(), "a.out") - main = os.path.join(os.getcwd(), "hidden", "main.c") + exe = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "a.out") + main = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "hidden", "main.c") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( Index: packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py +++ packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py @@ -42,7 +42,7 @@ # Test that -file-exec-and-symbols works for absolute path import os - path = os.path.join(os.getcwd(), self.myexe) + path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.myexe) self.runCmd("-file-exec-and-symbols \"%s\"" % path) self.expect("\^done") Index: packages/Python/lldbsuite/test/tools/lldb-mi/TestMiLibraryLoaded.py =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-mi/TestMiLibraryLoaded.py +++ packages/Python/lldbsuite/test/tools/lldb-mi/TestMiLibraryLoaded.py @@ -29,7 +29,7 @@ # Test =library-loaded import os - path = os.path.join(os.getcwd(), self.myexe) + path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.myexe) symbols_path = os.path.join( path + ".dSYM", "Contents", Index: packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/TestMiBreak.py =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/TestMiBreak.py +++ packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/TestMiBreak.py @@ -200,7 +200,7 @@ self.expect("\*stopped,reason=\"breakpoint-hit\"") import os - path = os.path.join(os.getcwd(), "main.cpp") + path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "main.cpp") line = line_number('main.cpp', '// BP_return') self.runCmd("-break-insert %s:%d" % (path, line)) self.expect("\^done,bkpt={number=\"2\"") Index: packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py +++ packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py @@ -68,7 +68,7 @@ # Prepare path to executable import os - path = os.path.join(os.getcwd(), self.myexe) + path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.myexe) self.spawnLldbMi(args="%s" % path) Index: packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py +++ packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py @@ -92,7 +92,7 @@ # Test that -symbol-list-lines works when file is specified using # absolute path import os - path = os.path.join(os.getcwd(), "main.cpp") + path = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "main.cpp") self.runCmd("-symbol-list-lines \"%s\"" % path) self.expect( "\^done,lines=\[\{pc=\"0x0*%x\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"\d+\"\})+\]" % Index: packages/Python/lldbsuite/test/types/AbstractBase.py =================================================================== --- packages/Python/lldbsuite/test/types/AbstractBase.py +++ packages/Python/lldbsuite/test/types/AbstractBase.py @@ -34,7 +34,7 @@ # module cacheing subsystem to be confused with executable name "a.out" # used for all the test cases. self.exe_name = self.testMethodName - self.golden_filename = os.path.join(os.getcwd(), "golden-output.txt") + self.golden_filename = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, "golden-output.txt") def tearDown(self): """Cleanup the test byproducts.""" Index: packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py =================================================================== --- packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py +++ packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py @@ -64,7 +64,7 @@ def generate_main_cpp(self, version=0): """Generate main.cpp from main.cpp.template.""" - temp = os.path.join(os.getcwd(), self.template) + temp = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.template) with open(temp, 'r') as f: content = f.read() @@ -72,7 +72,7 @@ '%ADD_EXTRA_CODE%', 'printf("This is version %d\\n");' % version) - src = os.path.join(os.getcwd(), self.source) + src = os.path.join(os.getcwd(), os.environ["LLDB_BUILD"], self.mydir, self.source) with open(src, 'w') as f: f.write(new_content)