diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
76 files changed, 257 insertions, 201 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py b/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py index b348e72606a..ad87796766c 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py @@ -30,7 +30,7 @@ class AttachResumeTestCase(TestBase): def process_attach_continue_interrupt_detach(self): """Test attach/continue/interrupt/detach""" - exe = os.path.join(os.getcwd(), exe_name) + exe = self.getBuildArtifact(exe_name) popen = self.spawnSubprocess(exe) self.addTearDownHook(self.cleanupSubprocesses) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py index 6f06ca7770c..f3b9a637360 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py @@ -30,9 +30,8 @@ class BadAddressBreakpointTestCase(TestBase): def address_breakpoints(self): """Test that breakpoints set on a bad address say they are bad.""" - - (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, - "Set a breakpoint here", lldb.SBFileSpec("main.c")) + (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( + self, "Set a breakpoint here", lldb.SBFileSpec("main.c")) # Now see if we can read from 0. If I can't do that, I don't have a good way to know # what an illegal address is... diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_case_sensitivity/TestBreakpointCaseSensitivity.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_case_sensitivity/TestBreakpointCaseSensitivity.py index 97611a27dba..8d174580f29 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_case_sensitivity/TestBreakpointCaseSensitivity.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_case_sensitivity/TestBreakpointCaseSensitivity.py @@ -44,16 +44,16 @@ class BreakpointCaseSensitivityTestCase(TestBase): # Create a target by the debugger. self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) - cwd = os.getcwd() + srcdir = self.getSourceDir() # try both BreakpointCreateByLocation and BreakpointCreateBySourceRegex for regex in [False, True]: # should always hit self.check_breakpoint('main.c', regex, True) # should always hit - self.check_breakpoint(os.path.join(cwd, 'main.c'), regex, True) + self.check_breakpoint(os.path.join(srcdir, 'main.c'), regex, True) # different case for directory - self.check_breakpoint(os.path.join(cwd.upper(), 'main.c'), + self.check_breakpoint(os.path.join(srcdir.upper(), 'main.c'), regex, case_insensitive) # different case for file @@ -61,7 +61,7 @@ class BreakpointCaseSensitivityTestCase(TestBase): regex, case_insensitive) # different case for both - self.check_breakpoint(os.path.join(cwd.upper(), 'Main.c'), + self.check_breakpoint(os.path.join(srcdir.upper(), 'Main.c'), regex, case_insensitive) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py index 059c9232e4c..d064b75b91c 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py @@ -54,7 +54,7 @@ class RegexpBreakCommandTestCase(TestBase): num_locations=1) # Check breakpoint with full file path. - full_path = os.path.join(os.getcwd(), self.source) + full_path = os.path.join(self.getSourceDir(), self.source) break_results = lldbutil.run_break_set_command( self, "b %s:%d" % (full_path, self.line)) lldbutil.check_breakpoint_result( diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py index 8130679c0f6..8b5352866c2 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py @@ -63,7 +63,7 @@ class BreakpointNames(TestBase): # 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(self.getSourceDir(), "main.c")) def check_name_in_target(self, bkpt_name): name_list = lldb.SBStringList() diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py index 958a17d83c9..7603bd90ffc 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py @@ -15,7 +15,6 @@ class BreakpointSetRestart(TestBase): def test_breakpoint_set_restart(self): self.build() - cwd = os.getcwd() exe = self.getBuildArtifact("a.out") target = self.dbg.CreateTarget(exe) @@ -33,9 +32,7 @@ class BreakpointSetRestart(TestBase): break bp = target.BreakpointCreateBySourceRegex( - self.BREAKPOINT_TEXT, lldb.SBFileSpec( - os.path.join( - cwd, 'main.cpp'))) + self.BREAKPOINT_TEXT, lldb.SBFileSpec('main.cpp')) self.assertTrue( bp.IsValid() and bp.GetNumLocations() == 1, VALID_BREAKPOINT) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile index 0ac34a186b2..2d7f20f43fe 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile @@ -1,7 +1,14 @@ LEVEL = ../../../make -CXX_SOURCES := main.cpp +CXX_SOURCES := relative.cpp EXE := CompDirSymLink include $(LEVEL)/Makefile.rules + +# Force relative filenames by copying it into the build directory. +relative.cpp: main.cpp + cp -f $< $@ + +clean:: + rm -rf relative.cpp diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py index e4672fbbf1b..86ef0d72b58 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py @@ -13,7 +13,7 @@ from lldbsuite.test import lldbutil _EXE_NAME = 'CompDirSymLink' # Must match Makefile -_SRC_FILE = 'main.cpp' +_SRC_FILE = 'relative.cpp' _COMP_DIR_SYM_LINK_PROP = 'plugin.symbol-file.dwarf.comp-dir-symlink-paths' @@ -25,8 +25,11 @@ class CompDirSymLinkTestCase(TestBase): # Call super's setUp(). 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.line = line_number( + os.path.join(self.getSourceDir(), "main.cpp"), + '// Set break point at this line.') + self.src_path = self.getBuildArtifact(_SRC_FILE) + @skipIf(hostoslist=["windows"]) def test_symlink_paths_set(self): @@ -39,6 +42,7 @@ class CompDirSymLinkTestCase(TestBase): @skipIf(hostoslist=no_match(["linux"])) def test_symlink_paths_set_procselfcwd(self): + os.chdir(self.getBuildDir()) pwd_symlink = '/proc/self/cwd' self.doBuild(pwd_symlink) self.runCmd( @@ -59,15 +63,15 @@ class CompDirSymLinkTestCase(TestBase): self.line) def create_src_symlink(self): - pwd_symlink = os.path.join(os.getcwd(), 'pwd_symlink') + pwd_symlink = self.getBuildArtifact('pwd_symlink') if os.path.exists(pwd_symlink): os.unlink(pwd_symlink) - os.symlink(os.getcwd(), pwd_symlink) + os.symlink(self.getBuildDir(), pwd_symlink) self.addTearDownHook(lambda: os.remove(pwd_symlink)) return pwd_symlink def doBuild(self, pwd_symlink): self.build(None, None, {'PWD': pwd_symlink}, True) - exe = os.path.join(os.getcwd(), _EXE_NAME) + exe = self.getBuildArtifact(_EXE_NAME) self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py index 34ce8868b8f..5c3da17c254 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py @@ -73,7 +73,7 @@ class BreakpointSerialization(TestBase): # Call super's setUp(). TestBase.setUp(self) - self.bkpts_file_path = os.path.join(os.getcwd(), "breakpoints.json") + self.bkpts_file_path = self.getBuildArtifact("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 @@ class BreakpointSerialization(TestBase): 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(self.getSourceDir(), "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. @@ -147,7 +147,7 @@ class BreakpointSerialization(TestBase): 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(self.getSourceDir(), "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. @@ -174,7 +174,7 @@ class BreakpointSerialization(TestBase): 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(self.getSourceDir(), "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. @@ -218,7 +218,7 @@ class BreakpointSerialization(TestBase): 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(self.getSourceDir(), "blubby.c")) # It isn't actually important for these purposes that these breakpoint # actually have locations. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py index 975ad32689b..cf1c448022b 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py @@ -30,9 +30,10 @@ class CommandScriptImmediateOutputTestCase (PExpectTest): @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr26139") def test_command_script_immediate_output_console(self): """Test that LLDB correctly allows scripted commands to set immediate output to the console.""" + self.makeBuildDir() self.launch(timeout=10) - script = os.path.join(os.getcwd(), 'custom_command.py') + script = os.path.join(self.getSourceDir(), 'custom_command.py') prompt = "\(lldb\) " self.sendline('command script import %s' % script, patterns=[prompt]) @@ -52,14 +53,15 @@ class CommandScriptImmediateOutputTestCase (PExpectTest): @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr26139") def test_command_script_immediate_output_file(self): """Test that LLDB correctly allows scripted commands to set immediate output to a file.""" + self.makeBuildDir() 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 = {self.getBuildArtifact('read.txt'): 'r', + self.getBuildArtifact('write.txt'): 'w', + self.getBuildArtifact('append.txt'): 'a', + self.getBuildArtifact('write_plus.txt'): 'w+', + self.getBuildArtifact('read_plus.txt'): 'r+', + self.getBuildArtifact('append_plus.txt'): 'a+'} starter_string = 'Starter Garbage\n' write_string = 'writing to file with mode: ' @@ -68,7 +70,7 @@ class CommandScriptImmediateOutputTestCase (PExpectTest): with open(path, 'w+') as init: init.write(starter_string) - script = os.path.join(os.getcwd(), 'custom_command.py') + script = os.path.join(self.getSourceDir(), 'custom_command.py') prompt = "\(lldb\) " self.sendline('command script import %s' % script, patterns=[prompt]) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py b/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py index 61cd7d5aa1c..6cf486fe1f0 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py @@ -41,23 +41,23 @@ class ExecTestCase(TestBase): self.do_test(True) def do_test(self, skip_exec): + self.makeBuildDir() + exe = self.getBuildArtifact("a.out") if self.getArchitecture() == 'x86_64': - source = os.path.join(os.getcwd(), "main.cpp") - o_file = os.path.join(os.getcwd(), "main.o") + source = self.getSourcePath("main.cpp") + o_file = self.getBuildArtifact("main.o") execute_command( "'%s' -g -O0 -arch i386 -arch x86_64 '%s' -c -o '%s'" % (os.environ["CC"], source, o_file)) execute_command( - "'%s' -g -O0 -arch i386 -arch x86_64 '%s'" % - (os.environ["CC"], o_file)) + "'%s' -g -O0 -arch i386 -arch x86_64 '%s' -o '%s'" % + (os.environ["CC"], o_file, exe)) if self.debug_info != "dsym": dsym_path = self.getBuildArtifact("a.out.dSYM") execute_command("rm -rf '%s'" % (dsym_path)) else: self.build() - exe = self.getBuildArtifact("a.out") - # Create the target target = self.dbg.CreateTarget(exe) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile index e1832fdefbe..c7c5ef40545 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile @@ -1,12 +1,14 @@ -all: clean - $(CC) -arch i386 -g -c a.c +SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/ + +all: a.c clean + $(CC) -arch i386 -g -c $(SRCDIR)/a.c ar -q liba-i386.a a.o ranlib liba-i386.a - $(CC) -arch x86_64 -g -c a.c + $(CC) -arch x86_64 -g -c $(SRCDIR)/a.c ar -q liba-x86_64.a a.o ranlib liba-x86_64.a lipo -create -output liba.a liba-i386.a liba-x86_64.a - $(CC) -g -c main.c + $(CC) -g -c $(SRCDIR)/main.c $(CC) -o a.out main.o -L. -la clean: diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/Makefile index 089fc237b05..cb1af719ac3 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/Makefile @@ -6,7 +6,7 @@ C_SOURCES := somefunc.c include $(LEVEL)/Makefile.rules other-2.o: other-2.cpp - $(CXX) $(CFLAGS_NO_DEBUG) -c other-2.cpp + $(CXX) $(CFLAGS_NO_DEBUG) -c $(SRCDIR)/other-2.cpp somefunc.o: somefunc.c - $(CC) $(CFLAGS) -std=c99 -c somefunc.c
\ No newline at end of file + $(CC) $(CFLAGS) -std=c99 -c $(SRCDIR)/somefunc.c diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py b/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py index 498384be424..9b485b2235d 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py @@ -39,7 +39,7 @@ class LaunchWithShellExpandTestCase(TestBase): self.runCmd( "process launch -X true -w %s -- fi*.tx? () > <" % - (os.getcwd())) + (self.getSourceDir())) process = self.process() @@ -77,7 +77,7 @@ class LaunchWithShellExpandTestCase(TestBase): self.runCmd( 'process launch -X true -w %s -- "foo bar"' % - (os.getcwd())) + (self.getSourceDir())) process = self.process() @@ -99,7 +99,8 @@ class LaunchWithShellExpandTestCase(TestBase): self.runCmd("process kill") - self.runCmd('process launch -X true -w %s -- foo\ bar' % (os.getcwd())) + self.runCmd('process launch -X true -w %s -- foo\ bar' + % (self.getBuildDir())) process = self.process() diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile index 9a954a201cf..0dd9eb41a40 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile @@ -7,11 +7,10 @@ CXX_SOURCES := main.cpp include $(LEVEL)/Makefile.rules -.PHONY: a.out: lib_a lib_b lib_c lib_d hidden_lib_d install_name_tool lib_%: - $(MAKE) -f $*.mk + $(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/$*.mk install_name_tool: ifeq ($(OS),Darwin) @@ -20,11 +19,11 @@ endif hidden_lib_d: - $(MAKE) -C hidden + $(MAKE) VPATH=$(SRCDIR)/hidden -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile clean:: - $(MAKE) -f a.mk clean - $(MAKE) -f b.mk clean - $(MAKE) -f c.mk clean - $(MAKE) -f d.mk clean - $(MAKE) -C hidden clean + $(MAKE) -f $(SRCDIR)/a.mk clean + $(MAKE) -f $(SRCDIR)/b.mk clean + $(MAKE) -f $(SRCDIR)/c.mk clean + $(MAKE) -f $(SRCDIR)/d.mk clean + $(MAKE) -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile clean diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py index 413ac2364f7..26fa4473fdb 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py @@ -22,6 +22,7 @@ class LoadUnloadTestCase(TestBase): def setUp(self): # Call super's setUp(). TestBase.setUp(self) + lldbutil.mkdir_p(self.getBuildArtifact("hidden")) # Find the line number to break for main.cpp. self.line = line_number( 'main.cpp', @@ -36,12 +37,12 @@ class LoadUnloadTestCase(TestBase): "=" + os.environ["LD_LIBRARY_PATH"] + ":" + - os.getcwd()) + self.getBuildDir()) else: if lldb.remote_platform: wd = lldb.remote_platform.GetWorkingDirectory() else: - wd = os.getcwd() + wd = self.getBuildDir() self.runCmd( "settings set target.env-vars " + self.dylibPath + @@ -63,7 +64,7 @@ class LoadUnloadTestCase(TestBase): cwd = os.getcwd() for f in shlibs: err = lldb.remote_platform.Put( - lldb.SBFileSpec(os.path.join(cwd, f)), + lldb.SBFileSpec(self.getBuildArtifact(f)), lldb.SBFileSpec(os.path.join(wd, f))) if err.Fail(): raise RuntimeError( @@ -78,13 +79,16 @@ class LoadUnloadTestCase(TestBase): raise RuntimeError( "Unable to create a directory '%s'." % hidden_dir) err = lldb.remote_platform.Put( - lldb.SBFileSpec(os.path.join(cwd, 'hidden', shlib)), + lldb.SBFileSpec(os.path.join('hidden', shlib)), lldb.SBFileSpec(hidden_file)) if err.Fail(): raise RuntimeError( "Unable copy 'libloadunload_d.so' to '%s'.\n>>> %s" % (wd, err.GetCString())) + # libloadunload_d.so does not appear in the image list because executable + # dependencies are resolved relative to the debuggers PWD. Bug? + @expectedFailureAll(oslist=["linux"]) @skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support @not_remote_testsuite_ready @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently @@ -100,11 +104,10 @@ class LoadUnloadTestCase(TestBase): 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(self.getBuildDir(), "hidden") - old_dylib = os.path.join(os.getcwd(), dylibName) + old_dylib = os.path.join(self.getBuildDir(), dylibName) new_dylib = os.path.join(new_dir, dylibName) - exe = self.getBuildArtifact("a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -115,14 +118,14 @@ class LoadUnloadTestCase(TestBase): # Add an image search path substitution pair. self.runCmd( "target modules search-paths add %s %s" % - (os.getcwd(), new_dir)) + (self.getBuildDir(), new_dir)) self.expect("target modules search-paths list", - substrs=[os.getcwd(), new_dir]) + substrs=[self.getBuildDir(), new_dir]) self.expect( "target modules search-paths query %s" % - os.getcwd(), + self.getBuildDir(), "Image search path successfully transformed", substrs=[new_dir]) @@ -146,6 +149,9 @@ class LoadUnloadTestCase(TestBase): "LLDB successfully locates the relocated dynamic library", substrs=[new_dylib]) + # libloadunload_d.so does not appear in the image list because executable + # dependencies are resolved relative to the debuggers PWD. Bug? + @expectedFailureAll(oslist=["linux"]) @skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support @expectedFailureAndroid # wrong source file shows up for hidden library @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently @@ -174,18 +180,19 @@ class LoadUnloadTestCase(TestBase): if lldb.remote_platform: wd = lldb.remote_platform.GetWorkingDirectory() else: - wd = os.getcwd() + wd = self.getBuildDir() old_dir = wd new_dir = os.path.join(wd, special_dir) old_dylib = os.path.join(old_dir, dylibName) - remove_dyld_path_cmd = "settings remove target.env-vars " + self.dylibPath + remove_dyld_path_cmd = "settings remove target.env-vars " \ + + self.dylibPath self.addTearDownHook( lambda: self.dbg.HandleCommand(remove_dyld_path_cmd)) - # For now we don't track (DY)LD_LIBRARY_PATH, so the old library will be in - # the modules list. + # For now we don't track (DY)LD_LIBRARY_PATH, so the old + # library will be in the modules list. self.expect("target modules list", substrs=[os.path.basename(old_dylib)], matching=True) @@ -203,7 +210,7 @@ class LoadUnloadTestCase(TestBase): if not self.platformIsDarwin(): env_cmd_string += ":" + wd self.runCmd(env_cmd_string) - + # This time, the hidden library should be picked up. self.expect("run", substrs=["return", "12345"]) @@ -233,15 +240,14 @@ class LoadUnloadTestCase(TestBase): self.runCmd("run", RUN_SUCCEEDED) + ctx = self.platformContext + dylibName = ctx.shlib_prefix + 'loadunload_a.' + ctx.shlib_extension + localDylibPath = self.getBuildArtifact(dylibName) if lldb.remote_platform: - shlib_dir = lldb.remote_platform.GetWorkingDirectory() - else: - shlib_dir = self.mydir - - if self.platformIsDarwin(): - dylibName = 'libloadunload_a.dylib' + wd = lldb.remote_platform.GetWorkingDirectory() + remoteDylibPath = lldbutil.join_remote_paths(wd, dylibName) else: - dylibName = 'libloadunload_a.so' + remoteDylibPath = localDylibPath # Make sure that a_function does not exist at this point. self.expect( @@ -253,13 +259,10 @@ class LoadUnloadTestCase(TestBase): # Use lldb 'process load' to load the dylib. self.expect( - "process load %s --install" % - dylibName, - "%s loaded correctly" % - dylibName, + "process load %s --install=%s" % (localDylibPath, remoteDylibPath), + "%s loaded correctly" % dylibName, patterns=[ - 'Loading "%s".*ok' % - dylibName, + 'Loading "%s".*ok' % localDylibPath, 'Image [0-9]+ loaded']) # Search for and match the "Image ([0-9]+) loaded" pattern. @@ -366,6 +369,9 @@ class LoadUnloadTestCase(TestBase): substrs=['stopped', 'stop reason = step over']) + # We can't find a breakpoint location for d_init before launching because + # executable dependencies are resolved relative to the debuggers PWD. Bug? + @expectedFailureAll(oslist=["linux"]) @skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently def test_static_init_during_load(self): diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk index 0eb810e2178..9b30db77171 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk @@ -13,11 +13,10 @@ CXXFLAGS += -fPIC include $(LEVEL)/Makefile.rules -.PHONY: $(DYLIB_FILENAME): lib_b -lib_b: - "$(MAKE)" -f b.mk +.PHONY lib_b: + $(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/b.mk clean:: - "$(MAKE)" -f b.mk clean + $(MAKE) -I $(SRCDIR) -f $(SRCDIR)/b.mk clean diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/TestPluginCommands.py b/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/TestPluginCommands.py index 18fcc41fa9f..25b83ed5532 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/TestPluginCommands.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/TestPluginCommands.py @@ -45,7 +45,7 @@ class PluginCommandTestCase(TestBase): retobj = lldb.SBCommandReturnObject() retval = debugger.GetCommandInterpreter().HandleCommand( - "plugin load %s" % plugin_lib_name, retobj) + "plugin load %s" % self.getBuildArtifact(plugin_lib_name), retobj) retobj.Clear() diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py b/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py index 1a6f4c12443..4a19a4e7760 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py @@ -44,9 +44,9 @@ class PluginPythonOSPlugin(TestBase): self.dbg.SetAsync(False) # Create a target by the debugger. - cwd = os.getcwd() exe = self.getBuildArtifact("a.out") - python_os_plugin_path = os.path.join(cwd, "operating_system.py") + python_os_plugin_path = os.path.join(self.getSourceDir(), + "operating_system.py") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -128,9 +128,9 @@ class PluginPythonOSPlugin(TestBase): self.dbg.SetAsync(False) # Create a target by the debugger. - cwd = os.getcwd() exe = self.getBuildArtifact("a.out") - python_os_plugin_path = os.path.join(cwd, "operating_system2.py") + python_os_plugin_path = os.path.join(self.getSourceDir(), + "operating_system2.py") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py index 3459da6a3af..49ff0319746 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -64,7 +64,7 @@ class MiniDumpTestCase(TestBase): """Test that we can examine a more interesting stack in a mini dump.""" self.build() exe = self.getBuildArtifact("a.out") - core = os.path.join(os.getcwd(), "core.dmp") + core = self.getBuildArtifact("core.dmp") try: # Set a breakpoint and capture a mini dump. target = self.dbg.CreateTarget(exe) @@ -100,7 +100,7 @@ class MiniDumpTestCase(TestBase): """Test that we can examine local variables in a mini dump.""" self.build() exe = self.getBuildArtifact("a.out") - core = os.path.join(os.getcwd(), "core.dmp") + core = self.getBuildArtifact("core.dmp") try: # Set a breakpoint and capture a mini dump. target = self.dbg.CreateTarget(exe) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py index c4d372cd3d3..94a013b53ce 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py @@ -27,7 +27,7 @@ class ProcessAttachTestCase(TestBase): def test_attach_to_process_by_id(self): """Test attach by process id""" self.build() - exe = os.path.join(os.getcwd(), exe_name) + exe = self.getBuildArtifact(exe_name) # Spawn a new process popen = self.spawnSubprocess(exe) @@ -43,13 +43,13 @@ class ProcessAttachTestCase(TestBase): @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_attach_to_process_from_different_dir_by_id(self): """Test attach by process id""" + newdir = self.getBuildArtifact("newdir") try: - os.mkdir(os.path.join(os.getcwd(),'newdir')) + os.mkdir(newdir) except OSError, e: if e.errno != os.errno.EEXIST: raise - testdir = os.getcwd() - newdir = os.path.join(testdir,'newdir') + testdir = self.getBuildDir() exe = os.path.join(newdir, 'proc_attach') self.buildProgram('main.cpp', exe) self.addTearDownHook(lambda: shutil.rmtree(newdir)) @@ -58,7 +58,7 @@ class ProcessAttachTestCase(TestBase): popen = self.spawnSubprocess(exe) self.addTearDownHook(self.cleanupSubprocesses) - os.chdir('newdir') + os.chdir(newdir) self.addTearDownHook(lambda: os.chdir(testdir)) self.runCmd("process attach -p " + str(popen.pid)) @@ -71,7 +71,7 @@ class ProcessAttachTestCase(TestBase): def test_attach_to_process_by_name(self): """Test attach by process name""" self.build() - exe = os.path.join(os.getcwd(), exe_name) + exe = self.getBuildArtifact(exe_name) # Spawn a new process popen = self.spawnSubprocess(exe) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py index 5465b7155f5..481ec6d7c05 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py @@ -25,7 +25,7 @@ class AttachDeniedTestCase(TestBase): def test_attach_to_process_by_id_denied(self): """Test attach by process id denied""" self.build() - exe = os.path.join(os.getcwd(), exe_name) + exe = self.getBuildArtifact(exe_name) # Use a file as a synchronization point between test and inferior. pid_file_path = lldbutil.append_to_process_working_directory( diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py index 18fe9d7cb2d..9692b169754 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py @@ -132,7 +132,9 @@ class ProcessLaunchTestCase(TestBase): 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 = self.getBuildArtifact(mywd) + try: os.makedirs(my_working_dir_path) + except: pass 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) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/my_working_dir/.keep b/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/my_working_dir/.keep deleted file mode 100644 index e69de29bb2d..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/my_working_dir/.keep +++ /dev/null diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py index e25d710d059..55dbc422371 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py @@ -22,7 +22,7 @@ class ProcessSaveCoreTestCase(TestBase): """Test that SaveCore fails if the process isn't stopped.""" self.build() exe = self.getBuildArtifact("a.out") - core = os.path.join(os.getcwd(), "core.dmp") + core = self.getBuildArtifact("core.dmp") target = self.dbg.CreateTarget(exe) process = target.LaunchSimple( None, None, self.get_process_working_directory()) @@ -36,7 +36,7 @@ class ProcessSaveCoreTestCase(TestBase): """Test that we can save a Windows mini dump.""" self.build() exe = self.getBuildArtifact("a.out") - core = os.path.join(os.getcwd(), "core.dmp") + core = self.getBuildArtifact("core.dmp") try: target = self.dbg.CreateTarget(exe) breakpoint = target.BreakpointCreateByName("bar") diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py b/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py index cb3baf4cfc5..f82443f9b15 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py @@ -149,7 +149,7 @@ class RegisterCommandsTestCase(TestBase): self.platform = "posix" if self.platform != "": - self.log_file = os.path.join(os.getcwd(), 'TestRegisters.log') + self.log_file = self.getBuildArtifact('TestRegisters.log') self.runCmd( "log enable " + self.platform + diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py b/lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py index 9957c91c5d6..9f1ec962adb 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py @@ -35,6 +35,8 @@ class SingleQuoteInCommandLineTestCase(TestBase): """Test that 'lldb my_file_name' works where my_file_name is a string with a single quote char in it.""" import pexpect self.buildDefault() + try: os.makedirs(self.getBuildArtifact("path with '09")) + except: pass system([["cp", self.getBuildArtifact("a.out"), "\"%s\"" % self.getBuildArtifact(self.myexe)]]) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/path with '09/.keep b/lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/path with '09/.keep deleted file mode 100644 index e69de29bb2d..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/path with '09/.keep +++ /dev/null diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile index 45b69a5bb6e..4f71dc87646 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile @@ -5,4 +5,4 @@ C_SOURCES := with-debug.c without-debug.c include $(LEVEL)/Makefile.rules without-debug.o: without-debug.c - $(CC) $(CFLAGS_NO_DEBUG) -c without-debug.c + $(CC) $(CFLAGS_NO_DEBUG) -c $< diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py b/lldb/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py index 3a18877ef2d..88267b60b97 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py @@ -46,7 +46,7 @@ class StopHookForMultipleThreadsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) import pexpect - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) prompt = "(lldb) " # So that the child gets torn down after the test. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py b/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py index 4d5ac02a11a..71bfff1d05d 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py @@ -62,8 +62,8 @@ class targetCommandTestCase(TestBase): def do_target_command(self): """Exercise 'target create', 'target list', 'target select' commands.""" exe_a = self.getBuildArtifact("a.out") - exe_b = os.path.join(os.getcwd(), "b.out") - exe_c = os.path.join(os.getcwd(), "c.out") + exe_b = self.getBuildArtifact("b.out") + exe_c = self.getBuildArtifact("c.out") self.runCmd("target list") output = self.res.GetOutput() @@ -114,7 +114,8 @@ class targetCommandTestCase(TestBase): def do_target_variable_command(self, exe_name): """Exercise 'target variable' command before and after starting the inferior.""" - self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact(exe_name), + CURRENT_EXECUTABLE_SET) self.expect( "target variable my_global_char", @@ -206,7 +207,8 @@ class targetCommandTestCase(TestBase): def do_target_variable_command_no_fail(self, exe_name): """Exercise 'target variable' command before and after starting the inferior.""" - self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact(exe_name), + CURRENT_EXECUTABLE_SET) self.expect( "target variable my_global_char", diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/Makefile index 4b5e0ee9422..88e031846c5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/Makefile @@ -4,6 +4,7 @@ CXX_SOURCES := main.cpp ENABLE_THREADS := YES -VPATH = .. - include $(LEVEL)/Makefile.rules + +main.cpp: ../main.cpp + cp $< $@ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py index 9fac249936e..dbde146e73a 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py @@ -46,7 +46,7 @@ class HelloWatchLocationTestCase(TestBase): """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 = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py index 17c5afa1753..8e19f9b3b5b 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py @@ -40,7 +40,7 @@ class HelloWatchpointTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py index e3e96bfce19..b51cab38aa8 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py @@ -37,7 +37,7 @@ class WatchpointSlotsTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Detect line number after which we are going to increment arrayName. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py index 47454498e70..e758f9cd7e2 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py @@ -42,7 +42,7 @@ class WatchedVariableHitWhenInScopeTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped in main. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py index 82865e646be..5bb683934c1 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py @@ -46,7 +46,7 @@ class WatchpointCommandsTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(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 @@ class WatchpointCommandsTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(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 @@ class WatchpointCommandsTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(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 @@ class WatchpointCommandsTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(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 @@ class WatchpointCommandsTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py index a4ceca34c08..cd819f27ec5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py @@ -45,7 +45,7 @@ class WatchpointLLDBCommandTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(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 @@ class WatchpointLLDBCommandTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py index 50cd88bd862..d9edd05d3a7 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py @@ -46,7 +46,7 @@ class WatchpointPythonCommandTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(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 @@ class WatchpointPythonCommandTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(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,8 @@ class WatchpointPythonCommandTestCase(TestBase): (self.source, self.decl)]) - cmd_script_file = os.path.join(os.getcwd(), "watchpoint_command.py") + cmd_script_file = os.path.join(self.getSourceDir(), + "watchpoint_command.py") self.runCmd("command script import '%s'" % (cmd_script_file)) self.runCmd( diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py index 34502a6d1d3..a77b1e70e3d 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py @@ -45,7 +45,7 @@ class WatchpointConditionCmdTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint to set a watchpoint when stopped on the breakpoint. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py index 104bc61a0f0..587dcabb2ba 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py @@ -41,8 +41,6 @@ class TestWatchpointSetEnable(TestBase): # Create a target by the debugger. self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) - cwd = os.getcwd() - bkpt_before = self.target.BreakpointCreateBySourceRegex("Set a breakpoint here", main_file_spec) self.assertEqual(bkpt_before.GetNumLocations(), 1, "Failed setting the before breakpoint.") diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py index 542473d00ee..d4f78a5f3ec 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py @@ -62,7 +62,7 @@ class WatchpointSizeTestCase(TestBase): self.build(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) - exe = os.path.join(os.getcwd(), self.exe_name) + exe = self.getBuildArtifact(self.exe_name) self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Detect line number after which we are going to increment arrayName. |