Skip to content

Commit f55db9c

Browse files
committedDec 12, 2017
[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 llvm-svn: 320494
1 parent 1a3b8fd commit f55db9c

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
 

‎clang/test/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,12 @@ add_lit_testsuites(CLANG ${CMAKE_CURRENT_SOURCE_DIR}
131131
add_custom_target(clang-test)
132132
add_dependencies(clang-test check-clang)
133133
set_target_properties(clang-test PROPERTIES FOLDER "Clang tests")
134+
135+
# FIXME: This logic can be removed once all buildbots have moved
136+
# debuginfo-test from clang/test to llvm/projects or monorepo.
137+
if(EXISTS debuginfo-tests)
138+
message(WARNING "Including debuginfo-tests in clang/test is deprecated. Move to llvm/projects or use monorepo.")
139+
if(EXISTS debuginfo-tests/CMakeLists.txt)
140+
add_subdirectory(debuginfo-tests)
141+
endif()
142+
endif()

‎clang/test/lit.cfg.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,20 @@
5858

5959
tools = [
6060
'c-index-test', 'clang-check', 'clang-diff', 'clang-format', 'opt',
61-
ToolSubst('%test_debuginfo', command=os.path.join(
62-
config.llvm_src_root, 'utils', 'test_debuginfo.pl')),
6361
ToolSubst('%clang_func_map', command=FindTool(
6462
'clang-func-mapping'), unresolved='ignore'),
6563
]
6664

65+
# FIXME: This logic can be removed once all buildbots have moved
66+
# debuginfo-test from clang/test to llvm/projects or monorepo.
67+
if os.path.exists(os.path.join(config.test_source_root, 'debuginfo-tests')):
68+
if os.path.isfile(
69+
os.path.join(config.test_source_root, 'debuginfo-tests', 'lit.cfg.py')):
70+
config.excludes.append('debuginfo-tests')
71+
else:
72+
tools.append(ToolSubst('%test_debuginfo', command=os.path.join(
73+
config.llvm_src_root, 'utils', 'test_debuginfo.pl')))
74+
6775
if config.clang_examples:
6876
tools.append('clang-interpreter')
6977

0 commit comments

Comments
 (0)