зеркало из https://github.com/microsoft/clang.git
Add clang_site_config user variable, so that extra tests (e.g., utils/C++Syntax)
can always find the main clang site config (when invoked via CMake/Makefiles, at least). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
923d56d436
Коммит
b258d8f961
|
@ -45,6 +45,7 @@ if(PYTHONINTERP_FOUND)
|
|||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
||||
--param clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
-sv ${CLANG_TEST_EXTRA_ARGS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${testdir}
|
||||
DEPENDS clang clang-cc index-test c-index-test
|
||||
|
@ -63,6 +64,7 @@ if(PYTHONINTERP_FOUND)
|
|||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
||||
--param clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
-sv ${CLANG_TEST_EXTRA_ARGS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS clang clang-cc index-test c-index-test
|
||||
|
@ -80,6 +82,7 @@ if(PYTHONINTERP_FOUND)
|
|||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
||||
--param clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
-sv ${CLANG_TEST_EXTRA_ARGS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../utils/C++Tests
|
||||
DEPENDS clang clang-cc index-test c-index-test
|
||||
|
|
|
@ -22,16 +22,17 @@ TESTARGS = -s
|
|||
endif
|
||||
endif
|
||||
|
||||
# Make sure any extra test suites can find the main site config.
|
||||
LIT_ARGS := --param clang_site_config=$(PROJ_OBJ_DIR)/lit.site.cfg
|
||||
|
||||
ifdef VG
|
||||
VGARG="--vg"
|
||||
else
|
||||
VGARG=
|
||||
LIT_ARGS += "--vg"
|
||||
endif
|
||||
|
||||
all:: lit.site.cfg
|
||||
@ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
|
||||
@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
|
||||
$(TESTARGS) $(TESTDIRS) $(VGARG)
|
||||
$(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
|
||||
|
||||
FORCE:
|
||||
|
||||
|
|
|
@ -55,6 +55,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 'clang_site_config' user parameter, and use that if available.
|
||||
site_cfg = lit.params.get('clang_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'.
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче