diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-02-06 18:22:51 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-02-06 18:22:51 +0000 |
commit | 332351d9b98f993e4d0eb83a98ff4d4bb619b541 (patch) | |
tree | 342ad2040a651b28809035213b74aa0719f4910b /lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py | |
parent | 2f6412c38962193f085f7830fd54e693579a35d2 (diff) | |
download | bcm5719-llvm-332351d9b98f993e4d0eb83a98ff4d4bb619b541.tar.gz bcm5719-llvm-332351d9b98f993e4d0eb83a98ff4d4bb619b541.zip |
Build each testcase variant in its own subdirectory and remove the srcdir lock file
This patch creates a <test>.dwarf, <test>.dwo, etc., build directory for each testcase variant.
Most importantly, this eliminates the need for the per-test lock file in the source directory.
Tests that are marked as NO_DEBUG_INFO_TESTCASE and build with
buildDefault() are built in a <test>.default build directory.
Differential Revision: https://reviews.llvm.org/D42763
llvm-svn: 324368
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py | 25 |
1 files changed, 6 insertions, 19 deletions
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 7fb1cb4b605..d4af8c0db72 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py @@ -22,13 +22,18 @@ class LoadUnloadTestCase(TestBase): def setUp(self): # Call super's setUp(). TestBase.setUp(self) - lldbutil.mkdir_p(self.getBuildArtifact("hidden")) + self.setup_test() + # Invoke the default build rule. + self.build() # Find the line number to break for main.cpp. self.line = line_number( 'main.cpp', '// Set break point at this line for test_lldb_process_load_and_unload_commands().') self.line_d_function = line_number( 'd.cpp', '// Find this line number within d_dunction().') + + def setup_test(self): + lldbutil.mkdir_p(self.getBuildArtifact("hidden")) if not self.platformIsDarwin(): if not lldb.remote_platform and "LD_LIBRARY_PATH" in os.environ: self.runCmd( @@ -94,10 +99,6 @@ class LoadUnloadTestCase(TestBase): @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently def test_modules_search_paths(self): """Test target modules list after loading a different copy of the library libd.dylib, and verifies that it works with 'target modules search-paths add'.""" - - # Invoke the default build rule. - self.build() - if self.platformIsDarwin(): dylibName = 'libloadunload_d.dylib' else: @@ -157,9 +158,6 @@ class LoadUnloadTestCase(TestBase): @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently def test_dyld_library_path(self): """Test (DY)LD_LIBRARY_PATH after moving libd.dylib, which defines d_function, somewhere else.""" - - # Invoke the default build rule. - self.build() self.copy_shlibs_to_remote(hidden_dir=True) exe = self.getBuildArtifact("a.out") @@ -222,9 +220,6 @@ class LoadUnloadTestCase(TestBase): @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently def test_lldb_process_load_and_unload_commands(self): """Test that lldb process load/unload command work correctly.""" - - # Invoke the default build rule. - self.build() self.copy_shlibs_to_remote() exe = self.getBuildArtifact("a.out") @@ -296,9 +291,6 @@ class LoadUnloadTestCase(TestBase): @skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support def test_load_unload(self): """Test breakpoint by name works correctly with dlopen'ing.""" - - # Invoke the default build rule. - self.build() self.copy_shlibs_to_remote() exe = self.getBuildArtifact("a.out") @@ -339,9 +331,6 @@ class LoadUnloadTestCase(TestBase): @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently def test_step_over_load(self): """Test stepping over code that loads a shared library works correctly.""" - - # Invoke the default build rule. - self.build() self.copy_shlibs_to_remote() exe = self.getBuildArtifact("a.out") @@ -374,8 +363,6 @@ class LoadUnloadTestCase(TestBase): @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently def test_static_init_during_load(self): """Test that we can set breakpoints correctly in static initializers""" - - self.build() self.copy_shlibs_to_remote() exe = self.getBuildArtifact("a.out") |