aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-10-28 02:42:54 +0000
committerMatthias Braun <matze@braunis.de>2015-10-28 02:42:54 +0000
commitdff7a0299c3fbee332f7942c8af674ac5ab1a102 (patch)
treee2bafda6129485f8877c7c3e5ebe26af3bb6bc78
parent3cd37f21a81e62e7764648f2b30d1d122720888a (diff)
Produce a lit.site.cfg in the build directory
This way the build directory does not need to be a subdirectory of the sourcedir. git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@251483 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt3
-rw-r--r--lit.cfg1
-rw-r--r--lit.site.cfg.in6
3 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a626244..3a16b0ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,3 +63,6 @@ set(CMAKE_CXX_COMPILE_OBJECT "${CMAKE_BINARY_DIR}/tools/timeit --summary <OBJECT
add_subdirectory(SingleSource)
add_subdirectory(MultiSource)
+
+# Produce lit.site.cfg
+configure_file("${CMAKE_SOURCE_DIR}/lit.site.cfg.in" "${CMAKE_BINARY_DIR}/lit.site.cfg")
diff --git a/lit.cfg b/lit.cfg
index 11809d97..175987a4 100644
--- a/lit.cfg
+++ b/lit.cfg
@@ -42,5 +42,4 @@ config.name = 'test-suite'
config.test_format = TestSuiteTest()
config.suffixes = ['.test']
-config.test_source_root = os.path.dirname(__file__)
config.excludes = ['ABI-Testsuite']
diff --git a/lit.site.cfg.in b/lit.site.cfg.in
new file mode 100644
index 00000000..a2ec64fe
--- /dev/null
+++ b/lit.site.cfg.in
@@ -0,0 +1,6 @@
+import sys
+
+config.test_source_root = "@CMAKE_BINARY_DIR@"
+config.test_suite_root = "@CMAKE_SOURCE_DIR@"
+
+lit_config.load_config(config, "@CMAKE_SOURCE_DIR@/lit.cfg")