From 63047d05c040c8377ba493b3e0ea6176c402edc1 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 16 Mar 2018 12:04:46 +0000 Subject: [dotest] Clean up test folder clean-up Summary: This patch implements a unified way of cleaning the build folder of each test. This is done by completely removing the build folder before each test, in the respective setUp() method. Previously, we were using a combination of several methods, each with it's own drawbacks: - nuking the entire build tree before running dotest: the issue here is that this did not take place if you ran dotest manually - running "make clean" before the main "make" target: this relied on the clean command being correctly implemented. This was usually true, but not always. - for files which were not produced by make, each python file was responsible for ensuring their deleting, using a variety of methods. With this approach, the previous methods become redundant. I remove the first two, since they are centralized. For the other various bits of clean-up code in python files, I indend to delete it when I come across it. Reviewers: aprantl Subscribers: emaste, ki.stfu, mgorny, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D44526 llvm-svn: 327703 --- .../lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py | 2 +- .../test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/linux') 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 c8aa99d76ac..946c151bb8f 100644 --- a/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py +++ b/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py @@ -22,7 +22,7 @@ class TargetSymbolsAddCommand(TestBase): """Test that 'target symbols add' can load the symbols 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) + self.build() exe = self.getBuildArtifact("stripped.out") self.target = self.dbg.CreateTarget(exe) diff --git a/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py b/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py index 541c3508c84..12506811c5e 100644 --- a/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py +++ b/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py @@ -17,7 +17,7 @@ class TestTargetSymbolsSepDebugSymlink(TestBase): @skipIf(hostoslist=["windows"]) @skipIfRemote # llvm.org/pr36237 def test_target_symbols_sepdebug_symlink_case(self): - self.build(clean=True) + self.build() exe = self.getBuildArtifact("dirsymlink/stripped.symlink") lldbutil.run_to_name_breakpoint(self, "main", exe_name = exe) -- cgit v1.2.3