llvm.org GIT mirror llvm / fb4fb6d
Switch to using 'lit.site.cfg.in' for the site config template for Unit tests, and generate it for CMake builds as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86451 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
4 changed file(s) with 24 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
1717 -e "s#\@LLVMGCC_DIR\@##"
1818 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
1919 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
20 COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
21 -e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
22 -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}#"
23 -e "s#\@LLVMGCC_DIR\@##"
24 -e "s#\@LLVM_BUILD_MODE\@#${CMAKE_CFG_INTDIR}#"
25 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in >
26 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
2027 COMMAND ${PYTHON_EXECUTABLE}
2128 ${LLVM_SOURCE_DIR}/utils/lit/lit.py
2229 -sv
201201
202202 Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE
203203 @echo "Making LLVM unittest 'lit.site.cfg' file..."
204 @echo "## Autogenerated by Makefile ##" > $@
205 @echo "# Do not edit!" >> $@
206 @echo >> $@
207 @echo "# Preserve some key paths for use by main LLVM test suite config." >> $@
208 @echo "config.llvm_obj_root = \"\"\"$(LLVM_OBJ_ROOT)\"\"\"" >> $@
209 @echo >> $@
210 @echo "# Remember the build mode." >> $@
211 @echo "config.llvm_build_mode = \"\"\"$(BuildMode)\"\"\"" >> $@
212 @echo >> $@
213 @echo "# Let the main config do the real work." >> $@
214 @echo "lit.load_config(config, \"\"\"$(LLVM_SRC_ROOT)/test/Unit/lit.cfg\"\"\")" >> $@
215
204 @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
205 -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
206 -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
207 -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
208 -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \
209 $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
66 # name: The name of this test suite.
77 config.name = 'LLVM-Unit'
88
9 # suffixes: A list of file extensions to treat as test files, this is actually
10 # set by on_clone().
9 # suffixes: A list of file extensions to treat as test files.
1110 config.suffixes = []
1211
1312 # test_source_root: The root path where tests are located.
0 ## Autogenerated by LLVM/Clang configuration.
1 # Do not edit!
2 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
3 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
4 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
5 config.llvmgcc_dir = "@LLVMGCCDIR@"
6 config.llvm_build_mode = "@LLVM_BUILD_MODE@"
7
8 # Let the main config do the real work.
9 lit.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg")