diff options
Diffstat (limited to 'test/Unit')
| -rw-r--r-- | test/Unit/lit.cfg.py (renamed from test/Unit/lit.cfg) | 18 | ||||
| -rw-r--r-- | test/Unit/lit.site.cfg.py.in (renamed from test/Unit/lit.site.cfg.in) | 4 |
2 files changed, 19 insertions, 3 deletions
diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg.py index 4bc973a58edd..dac9f5dc6c33 100644 --- a/test/Unit/lit.cfg +++ b/test/Unit/lit.cfg.py @@ -17,7 +17,21 @@ config.suffixes = [] config.test_source_root = os.path.join(config.lld_obj_root, 'unittests') config.test_exec_root = config.test_source_root + +# Tweak the PATH to include the tools dir. +path = os.path.pathsep.join((config.lld_tools_dir, config.llvm_tools_dir, config.environment['PATH'])) +config.environment['PATH'] = path + +path = os.path.pathsep.join((config.lld_libs_dir, config.llvm_libs_dir, + config.environment.get('LD_LIBRARY_PATH',''))) +config.environment['LD_LIBRARY_PATH'] = path + +# Propagate LLVM_SRC_ROOT into the environment. +config.environment['LLVM_SRC_ROOT'] = config.llvm_src_root + +# Propagate PYTHON_EXECUTABLE into the environment +config.environment['PYTHON_EXECUTABLE'] = sys.executable + + # testFormat: The test format to use to interpret tests. -if not hasattr(config, 'llvm_build_mode'): - lit_config.fatal("unable to find llvm_build_mode value on config") config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, 'Tests') diff --git a/test/Unit/lit.site.cfg.in b/test/Unit/lit.site.cfg.py.in index c2f3054a2d59..cc12117ad0bf 100644 --- a/test/Unit/lit.site.cfg.in +++ b/test/Unit/lit.site.cfg.py.in @@ -8,6 +8,8 @@ config.llvm_build_mode = "@LLVM_BUILD_MODE@" config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" config.lld_obj_root = "@LLD_BINARY_DIR@" config.lld_src_root = "@LLD_SOURCE_DIR@" +config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" +config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" config.target_triple = "@TARGET_TRIPLE@" config.python_executable = "@PYTHON_EXECUTABLE@" @@ -22,4 +24,4 @@ except KeyError as e: lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) # Let the main config do the real work. -lit_config.load_config(config, "@LLD_SOURCE_DIR@/test/Unit/lit.cfg") +lit_config.load_config(config, "@LLD_SOURCE_DIR@/test/Unit/lit.cfg.py") |
