[llvm] r318486 - Re-revert "Refactor debuginfo-tests"

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 16:41:18 PST 2017


Author: zturner
Date: Thu Nov 16 16:41:18 2017
New Revision: 318486

URL: http://llvm.org/viewvc/llvm-project?rev=318486&view=rev
Log:
Re-revert "Refactor debuginfo-tests"

This is still broken because it causes certain tests to be
run twice with slightly different configurations, which is
wrong in some cases.

You can observe this by running:

  ninja -nv check-all | grep debuginfo-tests

And seeing that it passes clang/test and clang/test/debuginfo-tests
to lit, which causes it to run debuginfo-tests twice.  The fix is
going to involve either:

  a) figuring out that we're running in this "deprecated" configuration,
     and then deleting the clang/test/debuginfo-tests path, which should
     cause it to behave identically to before, or:
  b) make lit smart enough that it doesn't descend into a sub-suite if
     that sub-suite already has a lit.cfg file.

Modified:
    llvm/trunk/CMakeLists.txt
    llvm/trunk/projects/CMakeLists.txt
    llvm/trunk/utils/lit/lit/llvm/config.py
    llvm/trunk/utils/test_debuginfo.pl

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=318486&r1=318485&r2=318486&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Nov 16 16:41:18 2017
@@ -110,7 +110,7 @@ endif()
 # LLVM_EXTERNAL_${project}_SOURCE_DIR using LLVM_ALL_PROJECTS
 # This allows an easy way of setting up a build directory for llvm and another
 # one for llvm+clang+... using the same sources.
-set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;debuginfo-tests;lld;polly")
+set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;lld;polly")
 set(LLVM_ENABLE_PROJECTS "" CACHE STRING
 	"Semicolon-separated list of projects to build (${LLVM_ALL_PROJECTS}), or \"all\".")
 if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
@@ -885,18 +885,13 @@ if( LLVM_INCLUDE_EXAMPLES )
 endif()
 
 if( LLVM_INCLUDE_TESTS )
-  if(TARGET clang)
+  if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
     include(LLVMExternalProjectUtils)
-    if (EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite)
-      llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
-        USE_TOOLCHAIN
-        TOOLCHAIN_TOOLS clang lld clang-cl
-        EXCLUDE_FROM_ALL
-        NO_INSTALL
-        ALWAYS_CLEAN)
-    endif()
-
-    add_llvm_external_project(debuginfo-tests projects/debuginfo-tests)
+    llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
+      USE_TOOLCHAIN
+      EXCLUDE_FROM_ALL
+      NO_INSTALL
+      ALWAYS_CLEAN)
   endif()
   add_subdirectory(utils/lit)
   add_subdirectory(test)

Modified: llvm/trunk/projects/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/CMakeLists.txt?rev=318486&r1=318485&r2=318486&view=diff
==============================================================================
--- llvm/trunk/projects/CMakeLists.txt (original)
+++ llvm/trunk/projects/CMakeLists.txt Thu Nov 16 16:41:18 2017
@@ -10,7 +10,6 @@ foreach(entry ${entries})
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libunwind) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/test-suite) AND
-       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/debuginfo-tests) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/parallel-libs) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/openmp))
       add_subdirectory(${entry})

Modified: llvm/trunk/utils/lit/lit/llvm/config.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/llvm/config.py?rev=318486&r1=318485&r2=318486&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/llvm/config.py (original)
+++ llvm/trunk/utils/lit/lit/llvm/config.py Thu Nov 16 16:41:18 2017
@@ -27,9 +27,8 @@ class LLVMConfig(object):
             # For tests that require Windows to run.
             features.add('system-windows')
 
-            lit_tools_dir = getattr(config, 'lit_tools_dir', None)
             # Seek sane tools in directories and set to $PATH.
-            path = self.lit_config.getToolsPath(lit_tools_dir,
+            path = self.lit_config.getToolsPath(config.lit_tools_dir,
                                                 config.environment['PATH'],
                                                 ['cmp.exe', 'grep.exe', 'sed.exe'])
             if path is not None:
@@ -414,10 +413,8 @@ class LLVMConfig(object):
             self.config.substitutions.append(
                 ('%target_itanium_abi_host_triple', ''))
 
-        clang_src_dir = getattr(self.config, 'clang_src_dir', None)
-        if clang_src_dir:
-            self.config.substitutions.append(
-                ('%src_include_dir', os.path.join(clang_src_dir, 'include')))
+        self.config.substitutions.append(
+            ('%src_include_dir', self.config.clang_src_dir + '/include'))
 
         # FIXME: Find nicer way to prohibit this.
         self.config.substitutions.append(

Modified: llvm/trunk/utils/test_debuginfo.pl
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/test_debuginfo.pl?rev=318486&r1=318485&r2=318486&view=diff
==============================================================================
--- llvm/trunk/utils/test_debuginfo.pl (original)
+++ llvm/trunk/utils/test_debuginfo.pl Thu Nov 16 16:41:18 2017
@@ -56,7 +56,7 @@ my $my_debugger = $ENV{'DEBUGGER'};
 if (!$my_debugger) {
     if ($use_lldb) {
         my $path = dirname(Cwd::abs_path($0));
-        $my_debugger = "/usr/bin/env python $path/../tools/clang/test/debuginfo-tests/tests/llgdb.py";
+        $my_debugger = "/usr/bin/env python $path/../tools/clang/test/debuginfo-tests/llgdb.py";
     } else {
         $my_debugger = "gdb";
     }




More information about the llvm-commits mailing list