[Lldb-commits] [lldb] r323830 - Enforce that NO_DEBUG_INFO_TESTCASEs build using buildDefault().

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 30 15:15:50 PST 2018


Author: adrian
Date: Tue Jan 30 15:15:49 2018
New Revision: 323830

URL: http://llvm.org/viewvc/llvm-project?rev=323830&view=rev
Log:
Enforce that NO_DEBUG_INFO_TESTCASEs build using buildDefault().

This is a prerequisite for building each test variant in its own subdirectory.

Modified:
    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/warnings/uuid/TestAddDsymCommand.py

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=323830&r1=323829&r2=323830&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Tue Jan 30 15:15:49 2018
@@ -1539,6 +1539,9 @@ class Base(unittest2.TestCase):
         """Platform specific way to build binaries with dsym info."""
         if not testdir:
             testdir = self.mydir
+        if self.debug_info <> "dsym":
+            raise Exception("NO_DEBUG_INFO_TESTCASE must build with buildDefault")
+
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildDsym(self, architecture, compiler,
@@ -1555,6 +1558,9 @@ class Base(unittest2.TestCase):
         """Platform specific way to build binaries with dwarf maps."""
         if not testdir:
             testdir = self.mydir
+        if self.debug_info <> "dwarf":
+            raise Exception("NO_DEBUG_INFO_TESTCASE must build with buildDefault")
+
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildDwarf(self, architecture, compiler,
@@ -1571,6 +1577,9 @@ class Base(unittest2.TestCase):
         """Platform specific way to build binaries with dwarf maps."""
         if not testdir:
             testdir = self.mydir
+        if self.debug_info <> "dwo":
+            raise Exception("NO_DEBUG_INFO_TESTCASE must build with buildDefault")
+
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildDwo(self, architecture, compiler,
@@ -1587,6 +1596,9 @@ class Base(unittest2.TestCase):
         """Platform specific way to build binaries with gmodules info."""
         if not testdir:
             testdir = self.mydir
+        if self.debug_info <> "gmodules":
+            raise Exception("NO_DEBUG_INFO_TESTCASE must build with buildDefault")
+
         module = builder_module()
         dictionary = lldbplatformutil.finalize_build_dictionary(dictionary)
         if not module.buildGModules(self, architecture, compiler,

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=323830&r1=323829&r2=323830&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 Tue Jan 30 15:15:49 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.buildDsym(clean=True)
+        self.buildDefault(clean=True, 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=323830&r1=323829&r2=323830&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py Tue Jan 30 15:15:49 2018
@@ -145,7 +145,7 @@ def buildDefault(
     commands = []
     if clean:
         commands.append(getMake(testdir) + ["clean", getCmdLine(dictionary)])
-    commands.append(getMake(testdir) + [getArchSpec(architecture),
+    commands.append(getMake(testdir) + ["all", getArchSpec(architecture),
                      getCCSpec(compiler), getCmdLine(dictionary)])
 
     runBuildCommands(commands, sender=sender)

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=323830&r1=323829&r2=323830&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py Tue Jan 30 15:15:49 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.buildDsym(clean=True)
+        self.buildDefault(clean=True, 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.buildDwarf(clean=False)
+        self.buildDefault(clean=False, 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.buildDsym(clean=True)
+        self.buildDefault(clean=True, 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.buildDsym(clean=True)
+        self.buildDefault(clean=True, dictionary={'MAKE_DSYM':'YES'})
 
         self.exe_name = 'a.out'
         self.do_add_dsym_with_dSYM_bundle(self.exe_name)




More information about the lldb-commits mailing list