r320494 - [debuginfo-tests] Add support for moving debuginfo-tests from clang/test to llvm/projects or monorepo.

Don Hinton via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 12 08:48:35 PST 2017


Author: dhinton
Date: Tue Dec 12 08:48:35 2017
New Revision: 320494

URL: http://llvm.org/viewvc/llvm-project?rev=320494&view=rev
Log:
[debuginfo-tests] Add support for moving debuginfo-tests from clang/test to llvm/projects or monorepo.

Summary:
The new version of debuginfo-tests will have it's own
lit.cfg.py file which is incompatible with the one in clang/test.
This change supports both the old and new versions, and can be used
until the bots actually move debuginfo-tests to either clang/test or
the monorepo.

This is a prerequisite for D40971.

Reviewers: zturner, aprantl

Subscribers: mgorny, JDevlieghere, llvm-commits, cfe-commits

Differential Revision: https://reviews.llvm.org/D41055

Modified:
    cfe/trunk/test/CMakeLists.txt
    cfe/trunk/test/lit.cfg.py

Modified: cfe/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=320494&r1=320493&r2=320494&view=diff
==============================================================================
--- cfe/trunk/test/CMakeLists.txt (original)
+++ cfe/trunk/test/CMakeLists.txt Tue Dec 12 08:48:35 2017
@@ -131,3 +131,12 @@ add_lit_testsuites(CLANG ${CMAKE_CURRENT
 add_custom_target(clang-test)
 add_dependencies(clang-test check-clang)
 set_target_properties(clang-test PROPERTIES FOLDER "Clang tests")
+
+# FIXME: This logic can be removed once all buildbots have moved
+# debuginfo-test from clang/test to llvm/projects or monorepo.
+if(EXISTS debuginfo-tests)
+  message(WARNING "Including debuginfo-tests in clang/test is deprecated.  Move to llvm/projects or use monorepo.")
+  if(EXISTS debuginfo-tests/CMakeLists.txt)
+    add_subdirectory(debuginfo-tests)
+  endif()
+endif()

Modified: cfe/trunk/test/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg.py?rev=320494&r1=320493&r2=320494&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg.py (original)
+++ cfe/trunk/test/lit.cfg.py Tue Dec 12 08:48:35 2017
@@ -58,12 +58,20 @@ tool_dirs = [config.clang_tools_dir, con
 
 tools = [
     'c-index-test', 'clang-check', 'clang-diff', 'clang-format', 'opt',
-    ToolSubst('%test_debuginfo', command=os.path.join(
-        config.llvm_src_root, 'utils', 'test_debuginfo.pl')),
     ToolSubst('%clang_func_map', command=FindTool(
         'clang-func-mapping'), unresolved='ignore'),
 ]
 
+# FIXME: This logic can be removed once all buildbots have moved
+# debuginfo-test from clang/test to llvm/projects or monorepo.
+if os.path.exists(os.path.join(config.test_source_root, 'debuginfo-tests')):
+  if os.path.isfile(
+      os.path.join(config.test_source_root, 'debuginfo-tests', 'lit.cfg.py')):
+    config.excludes.append('debuginfo-tests')
+  else:
+    tools.append(ToolSubst('%test_debuginfo', command=os.path.join(
+      config.llvm_src_root, 'utils', 'test_debuginfo.pl')))
+
 if config.clang_examples:
     tools.append('clang-interpreter')
 




More information about the cfe-commits mailing list