summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-09-21 00:24:52 +0000
committerZachary Turner <zturner@google.com>2017-09-21 00:24:52 +0000
commit1e4a12522612e29dc0d7e3597f6455da19e7fb8b (patch)
treedead30dd7246ea29d83b3de33332cc4555b5d4c5 /test/CMakeLists.txt
parent8d6f84c7d5658030b4d12074b679fe55e9eb3639 (diff)
[lit] Make lit support config files with .py extension.
Many editors and Python-related diagnostics tools such as debuggers break or fail in mysterious ways when python files don't end in .py. This is especially true on Windows, but still exists on other platforms. I don't want to be too heavy handed in changing everything across the board, but I do want to at least *allow* lit configs to have .py extensions. This patch makes the discovery process first look for a config file with a .py extension, and if one is not found, then looks for a config file using the old method. So for existing users, there should be no functional change. Differential Revision: https://reviews.llvm.org/D37838 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 28bec84989f..33e5da0eb1b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -11,12 +11,16 @@ llvm_canonicalize_cmake_booleans(
BUILD_SHARED_LIBS)
configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+ ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
+ MAIN_CONFIG
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
)
configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
+ ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
+ MAIN_CONFIG
+ ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
)
# Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.
@@ -148,15 +152,11 @@ set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
add_lit_testsuite(check-llvm "Running the LLVM regression tests"
${CMAKE_CURRENT_BINARY_DIR}
- PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
- llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
DEPENDS ${LLVM_TEST_DEPENDS}
)
set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
- PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
- llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
DEPENDS ${LLVM_TEST_DEPENDS}
)