${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
${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
${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
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:
# 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'.
#