diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-08 19:47:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-08 19:47:36 +0000 |
commit | aefd63d4158cc80f1de909db38f9c97bdb399b75 (patch) | |
tree | 4f6632c62f05dc4949c53ae699b8c139b1f9f384 | |
parent | e8b0915b21026cd2314c1802bd2ccd4c91f4a83d (diff) | |
download | llvm-aefd63d4158cc80f1de909db38f9c97bdb399b75.tar.gz llvm-aefd63d4158cc80f1de909db38f9c97bdb399b75.tar.bz2 llvm-aefd63d4158cc80f1de909db38f9c97bdb399b75.tar.xz |
CMake/lit: Add llvm_{unit_,}site_config parameters, and always pass them when running tests from the project files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90869 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/Unit/lit.cfg | 6 | ||||
-rw-r--r-- | test/lit.cfg | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d7037ab44c..5ad48eff4e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -31,6 +31,8 @@ if(PYTHONINTERP_FOUND) ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg COMMAND ${PYTHON_EXECUTABLE} ${LLVM_SOURCE_DIR}/utils/lit/lit.py + --param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg + --param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg -sv ${CMAKE_CURRENT_BINARY_DIR} DEPENDS diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg index 8321593cf7..34372bb6cb 100644 --- a/test/Unit/lit.cfg +++ b/test/Unit/lit.cfg @@ -32,6 +32,12 @@ if config.test_exec_root is None: # configuration hasn't been created by the build system, or we are in an # out-of-tree build situation). + # Check for 'llvm_unit_site_config' user parameter, and use that if available. + site_cfg = lit.params.get('llvm_unit_site_config', None) + if site_cfg and os.path.exists(site_cfg): + lit.load_config(config, site_cfg) + raise SystemExit + # Try to detect the situation where we are using an out-of-tree build by # looking for 'llvm-config'. # diff --git a/test/lit.cfg b/test/lit.cfg index 1939792327..246f2701ce 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -58,6 +58,12 @@ if config.test_exec_root is None: # configuration hasn't been created by the build system, or we are in an # out-of-tree build situation). + # Check for 'llvm_site_config' user parameter, and use that if available. + site_cfg = lit.params.get('llvm_site_config', None) + if site_cfg and os.path.exists(site_cfg): + lit.load_config(config, site_cfg) + raise SystemExit + # Try to detect the situation where we are using an out-of-tree build by # looking for 'llvm-config'. # |