[Lldb-commits] [lldb] r327703 - [dotest] Clean up test folder clean-up

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 16 05:04:47 PDT 2018


Author: labath
Date: Fri Mar 16 05:04:46 2018
New Revision: 327703

URL: http://llvm.org/viewvc/llvm-project?rev=327703&view=rev
Log:
[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

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
    lldb/trunk/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py
    lldb/trunk/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py
    lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py
    lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
    lldb/trunk/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
    lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py
    lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_darwin.py
    lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_freebsd.py
    lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux.py
    lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_netbsd.py
    lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_win32.py
    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
    lldb/trunk/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
    lldb/trunk/test/CMakeLists.txt

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py Fri Mar 16 05:04:46 2018
@@ -64,7 +64,6 @@ class CompDirSymLinkTestCase(TestBase):
             self.line)
 
     def create_src_symlink(self):
-        self.makeBuildDir()
         pwd_symlink = self.getBuildArtifact('pwd_symlink')
         if os.path.exists(pwd_symlink):
             os.unlink(pwd_symlink)
@@ -73,7 +72,7 @@ class CompDirSymLinkTestCase(TestBase):
         return pwd_symlink
 
     def doBuild(self, pwd_symlink):
-        self.build(None, None, {'PWD': pwd_symlink}, True)
+        self.build(None, None, {'PWD': pwd_symlink})
 
         exe = self.getBuildArtifact(_EXE_NAME)
         self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py Fri Mar 16 05:04:46 2018
@@ -30,7 +30,6 @@ class CommandScriptImmediateOutputTestCa
     @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(self.getSourceDir(), 'custom_command.py')
@@ -53,7 +52,6 @@ class CommandScriptImmediateOutputTestCa
     @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 = {self.getBuildArtifact('read.txt'): 'r',

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py Fri Mar 16 05:04:46 2018
@@ -41,7 +41,6 @@ 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 = self.getSourcePath("main.cpp")

Modified: lldb/trunk/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py Fri Mar 16 05:04:46 2018
@@ -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)

Modified: lldb/trunk/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py Fri Mar 16 05:04:46 2018
@@ -17,7 +17,7 @@ class TestTargetSymbolsSepDebugSymlink(T
     @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)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py Fri Mar 16 05:04:46 2018
@@ -97,7 +97,6 @@ class InlineTest(TestBase):
             return "-N dsym " + self.mydir
 
     def BuildMakefile(self):
-        self.makeBuildDir()
         makefilePath = self.getBuildArtifact("Makefile")
         if os.path.exists(makefilePath):
             return

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Mar 16 05:04:46 2018
@@ -44,6 +44,7 @@ import inspect
 import io
 import os.path
 import re
+import shutil
 import signal
 from subprocess import *
 import sys
@@ -697,17 +698,18 @@ class Base(unittest2.TestCase):
 
     def getBuildDir(self):
         """Return the full path to the current test."""
-        variant = self.getDebugInfo()
-        if variant is None:
-            variant = 'default'
         return os.path.join(os.environ["LLDB_BUILD"], self.mydir,
                             self.getBuildDirBasename())
     
      
     def makeBuildDir(self):
-        """Create the test-specific working directory."""
+        """Create the test-specific working directory, deleting any previous
+        contents."""
         # See also dotest.py which sets up ${LLDB_BUILD}.
-        lldbutil.mkdir_p(self.getBuildDir())
+        bdir = self.getBuildDir()
+        if os.path.isdir(bdir):
+            shutil.rmtree(bdir)
+        lldbutil.mkdir_p(bdir)
  
     def getBuildArtifact(self, name="a.out"):
         """Return absolute path to an artifact in the test's build directory."""
@@ -1490,26 +1492,23 @@ class Base(unittest2.TestCase):
             self,
             architecture=None,
             compiler=None,
-            dictionary=None,
-            clean=True):
+            dictionary=None):
         """Platform specific way to build the default binaries."""
         testdir = self.mydir
         testname = self.getBuildDirBasename()
         if self.getDebugInfo():
             raise Exception("buildDefault tests must set NO_DEBUG_INFO_TESTCASE")
         module = builder_module()
-        self.makeBuildDir()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildDefault(self, architecture, compiler,
-                                   dictionary, clean, testdir, testname):
+                                   dictionary, testdir, testname):
             raise Exception("Don't know how to build default binary")
 
     def buildDsym(
             self,
             architecture=None,
             compiler=None,
-            dictionary=None,
-            clean=True):
+            dictionary=None):
         """Platform specific way to build binaries with dsym info."""
         testdir = self.mydir
         testname = self.getBuildDirBasename()
@@ -1519,15 +1518,14 @@ class Base(unittest2.TestCase):
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildDsym(self, architecture, compiler,
-                                dictionary, clean, testdir, testname):
+                                dictionary, testdir, testname):
             raise Exception("Don't know how to build binary with dsym")
 
     def buildDwarf(
             self,
             architecture=None,
             compiler=None,
-            dictionary=None,
-            clean=True):
+            dictionary=None):
         """Platform specific way to build binaries with dwarf maps."""
         testdir = self.mydir
         testname = self.getBuildDirBasename()
@@ -1537,15 +1535,14 @@ class Base(unittest2.TestCase):
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildDwarf(self, architecture, compiler,
-                                   dictionary, clean, testdir, testname):
+                                   dictionary, testdir, testname):
             raise Exception("Don't know how to build binary with dwarf")
 
     def buildDwo(
             self,
             architecture=None,
             compiler=None,
-            dictionary=None,
-            clean=True):
+            dictionary=None):
         """Platform specific way to build binaries with dwarf maps."""
         testdir = self.mydir
         testname = self.getBuildDirBasename()
@@ -1555,15 +1552,14 @@ class Base(unittest2.TestCase):
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildDwo(self, architecture, compiler,
-                                   dictionary, clean, testdir, testname):
+                                   dictionary, testdir, testname):
             raise Exception("Don't know how to build binary with dwo")
 
     def buildGModules(
             self,
             architecture=None,
             compiler=None,
-            dictionary=None,
-            clean=True):
+            dictionary=None):
         """Platform specific way to build binaries with gmodules info."""
         testdir = self.mydir
         testname = self.getBuildDirBasename()
@@ -1573,7 +1569,7 @@ class Base(unittest2.TestCase):
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildGModules(self, architecture, compiler,
-                                    dictionary, clean, testdir, testname):
+                                    dictionary, testdir, testname):
             raise Exception("Don't know how to build binary with gmodules")
 
     def buildGo(self):
@@ -1869,7 +1865,6 @@ class TestBase(Base):
     timeWaitNextLaunch = 1.0
 
     def generateSource(self, source):
-        self.makeBuildDir()
         template = source + '.template'
         temp = os.path.join(self.getSourceDir(), template)
         with open(temp, 'r') as f:
@@ -2297,26 +2292,21 @@ class TestBase(Base):
             self,
             architecture=None,
             compiler=None,
-            dictionary=None,
-            clean=True):
+            dictionary=None):
         """Platform specific way to build the default binaries."""
         module = builder_module()
-        self.makeBuildDir()
 
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if self.getDebugInfo() is None:
-            return self.buildDefault(architecture, compiler, dictionary,
-                                     clean)
+            return self.buildDefault(architecture, compiler, dictionary)
         elif self.getDebugInfo() == "dsym":
-            return self.buildDsym(architecture, compiler, dictionary, clean)
+            return self.buildDsym(architecture, compiler, dictionary)
         elif self.getDebugInfo() == "dwarf":
-            return self.buildDwarf(architecture, compiler, dictionary, clean)
+            return self.buildDwarf(architecture, compiler, dictionary)
         elif self.getDebugInfo() == "dwo":
-            return self.buildDwo(architecture, compiler, dictionary,
-                                 clean)
+            return self.buildDwo(architecture, compiler, dictionary)
         elif self.getDebugInfo() == "gmodules":
-            return self.buildGModules(architecture, compiler, dictionary,
-                                      clean)
+            return self.buildGModules(architecture, compiler, dictionary)
         else:
             self.fail("Can't build for debug info: %s" % self.getDebugInfo())
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py Fri Mar 16 05:04:46 2018
@@ -25,7 +25,7 @@ class AddDsymMidExecutionCommandCase(Tes
     @no_debug_info_test  # Prevent the genaration of the dwarf version of this test
     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.buildDefault(clean=True, dictionary={'MAKE_DSYM':'YES'})
+        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
         exe = self.getBuildArtifact("a.out")
 
         self.target = self.dbg.CreateTarget(exe)

Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py Fri Mar 16 05:04:46 2018
@@ -140,13 +140,10 @@ def buildDefault(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None,
         testname=None):
     """Build the binaries the default way."""
     commands = []
-    if clean:
-        commands.append(getMake(testdir, testname) + ["clean", getCmdLine(dictionary)])
     commands.append(getMake(testdir, testname) + ["all", getArchSpec(architecture),
                      getCCSpec(compiler), getCmdLine(dictionary)])
 
@@ -161,14 +158,10 @@ def buildDwarf(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None,
         testname=None):
     """Build the binaries with dwarf debug info."""
     commands = []
-    if clean:
-        commands.append(getMake(testdir, testname) +
-                        ["clean", getCmdLine(dictionary)])
     commands.append(getMake(testdir, testname) +
                     ["MAKE_DSYM=NO", getArchSpec(architecture),
                      getCCSpec(compiler), getCmdLine(dictionary)])
@@ -183,14 +176,10 @@ def buildDwo(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None,
         testname=None):
     """Build the binaries with dwarf debug info."""
     commands = []
-    if clean:
-        commands.append(getMake(testdir, testname) +
-                        ["clean", getCmdLine(dictionary)])
     commands.append(getMake(testdir, testname) +
                     ["MAKE_DSYM=NO", "MAKE_DWO=YES",
                      getArchSpec(architecture),
@@ -207,14 +196,10 @@ def buildGModules(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None,
         testname=None):
     """Build the binaries with dwarf debug info."""
     commands = []
-    if clean:
-        commands.append(getMake(testdir, testname) +
-                        ["clean", getCmdLine(dictionary)])
     commands.append(getMake(testdir, testname) +
                     ["MAKE_DSYM=NO",
                      "MAKE_GMODULES=YES",

Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_darwin.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_darwin.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_darwin.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_darwin.py Fri Mar 16 05:04:46 2018
@@ -10,14 +10,10 @@ def buildDsym(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None,
         testname=None):
     """Build the binaries with dsym debug info."""
     commands = []
-    if clean:
-        commands.append(getMake(testdir, testname) +
-                        ["clean", getCmdLine(dictionary)])
     commands.append(getMake(testdir, testname) +
                     ["MAKE_DSYM=YES",
                      getArchSpec(architecture),

Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_freebsd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_freebsd.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_freebsd.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_freebsd.py Fri Mar 16 05:04:46 2018
@@ -6,6 +6,5 @@ def buildDsym(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None):
     return False

Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux.py Fri Mar 16 05:04:46 2018
@@ -6,6 +6,5 @@ def buildDsym(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None):
     return False

Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_netbsd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_netbsd.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_netbsd.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_netbsd.py Fri Mar 16 05:04:46 2018
@@ -6,6 +6,5 @@ def buildDsym(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None):
     return False

Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_win32.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_win32.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_win32.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_win32.py Fri Mar 16 05:04:46 2018
@@ -6,6 +6,5 @@ def buildDsym(
         architecture=None,
         compiler=None,
         dictionary=None,
-        clean=True,
         testdir=None):
     return False

Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py Fri Mar 16 05:04:46 2018
@@ -27,7 +27,6 @@ class MiTestCaseBase(Base):
             raise("mydir is empty")
 
         Base.setUp(self)
-        self.makeBuildDir()
         self.buildDefault()
         self.child_prompt = "(gdb)"
         self.myexe = self.getBuildArtifact("a.out")

Modified: lldb/trunk/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py Fri Mar 16 05:04:46 2018
@@ -28,14 +28,14 @@ class AddDsymCommandCase(TestBase):
 
         # Call the program generator to produce main.cpp, version 1.
         self.generate_main_cpp(version=1)
-        self.buildDefault(clean=True, dictionary={'MAKE_DSYM':'YES'})
+        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
 
         # Insert some delay and then call the program generator to produce
         # main.cpp, version 2.
         time.sleep(5)
         self.generate_main_cpp(version=101)
         # Now call make again, but this time don't generate the dSYM.
-        self.buildDefault(clean=False, dictionary={'MAKE_DSYM':'NO'})
+        self.buildDefault(dictionary={'MAKE_DSYM':'NO'})
 
         self.exe_name = 'a.out'
         self.do_add_dsym_with_error(self.exe_name)
@@ -46,7 +46,7 @@ class AddDsymCommandCase(TestBase):
 
         # Call the program generator to produce main.cpp, version 1.
         self.generate_main_cpp(version=1)
-        self.buildDefault(clean=True, dictionary={'MAKE_DSYM':'YES'})
+        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
 
         self.exe_name = 'a.out'
         self.do_add_dsym_with_success(self.exe_name)
@@ -57,7 +57,7 @@ class AddDsymCommandCase(TestBase):
 
         # Call the program generator to produce main.cpp, version 1.
         self.generate_main_cpp(version=1)
-        self.buildDefault(clean=True, dictionary={'MAKE_DSYM':'YES'})
+        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
 
         self.exe_name = 'a.out'
         self.do_add_dsym_with_dSYM_bundle(self.exe_name)
@@ -72,7 +72,6 @@ class AddDsymCommandCase(TestBase):
             '%ADD_EXTRA_CODE%',
             'printf("This is version %d\\n");' %
             version)
-        self.makeBuildDir()
         src = os.path.join(self.getBuildDir(), self.source)
         with open(src, 'w') as f:
             f.write(new_content)

Modified: lldb/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=327703&r1=327702&r2=327703&view=diff
==============================================================================
--- lldb/trunk/test/CMakeLists.txt (original)
+++ lldb/trunk/test/CMakeLists.txt Fri Mar 16 05:04:46 2018
@@ -6,8 +6,6 @@ function(add_python_test_target name tes
     )
 
   add_custom_target(${name}
-    # Clear the test directory first.
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/lldb-test-build.noindex
     COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS}
     COMMENT "${comment}"
     DEPENDS ${LLDB_TEST_DEPS}




More information about the lldb-commits mailing list