aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/lit.cfg7
-rw-r--r--test/lit.site.cfg.in1
3 files changed, 9 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ab060c9..433af90 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -35,6 +35,7 @@ if(PYTHONINTERP_FOUND)
-e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
-e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
-e "s#\@LLVMGCCDIR\@##"
+ -e "s#\@PYTHON_EXECUTABLE\@#${PYTHON_EXECUTABLE}#"
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
diff --git a/test/lit.cfg b/test/lit.cfg
index fd3120a..65e0dc7 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -48,6 +48,13 @@ if llvm_obj_root is not None:
# Propogate 'HOME' through the environment.
config.environment['HOME'] = os.environ['HOME']
+# Propogate LLVM_SRC_ROOT into the environment.
+config.environment['LLVM_SRC_ROOT'] = config.llvm_src_root
+
+# Propogate PYTHON_EXEUTABLE into the environment
+config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable',
+ '')
+
###
import os
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 88699e3..79b2c60 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -4,6 +4,7 @@ config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvmgcc_dir = "@LLVMGCCDIR@"
+config.python_executable = "@PYTHON_EXECUTABLE@"
# Let the main config do the real work.
lit.load_config(config, "@LLVM_SOURCE_DIR@/test/lit.cfg")