diff options
| author | Adrian Prantl <aprantl@apple.com> | 2018-01-19 23:24:35 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2018-01-19 23:24:35 +0000 |
| commit | 595048f3ecf3317aa2d32bed5141a526415f5aea (patch) | |
| tree | 92980c57a7209f1ec112bb5f938b2021fec08f21 /lldb/packages/Python/lldbsuite/test/linux | |
| parent | ce8746d178dba08ae576c7f53448772d6728d2f5 (diff) | |
| download | bcm5719-llvm-595048f3ecf3317aa2d32bed5141a526415f5aea.tar.gz bcm5719-llvm-595048f3ecf3317aa2d32bed5141a526415f5aea.zip | |
Wrap all references to build artifacts in the LLDB testsuite (NFC)
in TestBase::getBuildArtifact(). This NFC commit is in preparation for
https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree).
Differential Revision: https://reviews.llvm.org/D42280
llvm-svn: 323007
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/linux')
3 files changed, 5 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py b/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py index 477ddf9c15b..52167d02ef4 100644 --- a/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py +++ b/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py @@ -23,7 +23,7 @@ class TargetSymbolsAddCommand(TestBase): 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 = self.getBuildArtifact("stripped.out") self.target = self.dbg.CreateTarget(exe) self.assertTrue(self.target, VALID_TARGET) @@ -46,7 +46,8 @@ class TargetSymbolsAddCommand(TestBase): self.expect("frame select", substrs=['main.c'], matching=False) # Tell LLDB that a.out has symbols for stripped.out - self.runCmd("target symbols add -s stripped.out a.out") + self.runCmd("target symbols add -s %s %s" % + exe, self.getBuildArtifact("a.out")) # Check that symbols are now loaded and main.c is in the output. self.expect("frame select", substrs=['main.c']) diff --git a/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py b/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py index f24cae9ee0d..7ffc29fd498 100644 --- a/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py +++ b/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py @@ -30,7 +30,7 @@ class BuiltinTrapTestCase(TestBase): def test_with_run_command(self): """Test that LLDB handles a function with __builtin_trap correctly.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line, num_expected_locations=1, diff --git a/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py b/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py index 06859470150..702d124834b 100644 --- a/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py +++ b/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py @@ -26,7 +26,7 @@ class CreateDuringInstructionStepTestCase(TestBase): bugnumber="llvm.org/pr24737") def test_step_inst(self): self.build(dictionary=self.getBuildFlags()) - exe = os.path.join(os.getcwd(), "a.out") + exe = self.getBuildArtifact("a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target and target.IsValid(), "Target is valid") |

