[llvm-commits] [llvm] r86452 - in /llvm/trunk/test: CMakeLists.txt Makefile lit.cfg
Daniel Dunbar
daniel at zuster.org
Sun Nov 8 01:08:00 PST 2009
Author: ddunbar
Date: Sun Nov 8 03:08:00 2009
New Revision: 86452
URL: http://llvm.org/viewvc/llvm-project?rev=86452&view=rev
Log:
Derive the right paths to use during testing instead of passing it in via make.
Also, fix a few other details of the cmake test target and rename it to
'check'. CMake tests now work for the most part, but there are a handful of
failures left due to missing site.exp bits.
Modified:
llvm/trunk/test/CMakeLists.txt
llvm/trunk/test/Makefile
llvm/trunk/test/lit.cfg
Modified: llvm/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=86452&r1=86451&r2=86452&view=diff
==============================================================================
--- llvm/trunk/test/CMakeLists.txt (original)
+++ llvm/trunk/test/CMakeLists.txt Sun Nov 8 03:08:00 2009
@@ -5,31 +5,31 @@
include(FindPythonInterp)
if(PYTHONINTERP_FOUND)
- get_target_property(LLVM_TOOLS_PATH llvm-config RUNTIME_OUTPUT_DIRECTORY)
-
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in
${CMAKE_CURRENT_BINARY_DIR}/site.exp)
- add_custom_target(llvm-test
+ MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
+
+ add_custom_target(check
COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
-e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
- -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}#"
- -e "s#\@LLVMGCC_DIR\@##"
+ -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
+ -e "s#\@LLVMGCCDIR\@##"
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
-e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
- -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}#"
- -e "s#\@LLVMGCC_DIR\@##"
+ -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
+ -e "s#\@LLVMGCCDIR\@##"
-e "s#\@LLVM_BUILD_MODE\@#${CMAKE_CFG_INTDIR}#"
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in >
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
- COMMAND ${PYTHON_EXECUTABLE}
+ COMMAND ${PYTHON_EXECUTABLE}
${LLVM_SOURCE_DIR}/utils/lit/lit.py
-sv
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS
COMMENT "Running LLVM regression tests")
-endif()
+endif()
Modified: llvm/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=86452&r1=86451&r2=86452&view=diff
==============================================================================
--- llvm/trunk/test/Makefile (original)
+++ llvm/trunk/test/Makefile Sun Nov 8 03:08:00 2009
@@ -98,19 +98,11 @@
check-local-lit:: lit.site.cfg Unit/lit.site.cfg
( $(ULIMIT) \
- $(LLVM_SRC_ROOT)/utils/lit/lit.py \
- --path "$(LLVMToolDir)" \
- --path "$(LLVM_SRC_ROOT)/test/Scripts" \
- --path "$(LLVMGCCDIR)/bin" \
- $(LIT_ARGS) $(LIT_TESTSUITE) )
+ $(LLVM_SRC_ROOT)/utils/lit/lit.py $(LIT_ARGS) $(LIT_TESTSUITE) )
check-local-all:: lit.site.cfg Unit/lit.site.cfg extra-lit-site-cfgs
( $(ULIMIT) \
- $(LLVM_SRC_ROOT)/utils/lit/lit.py \
- --path "$(LLVMToolDir)" \
- --path "$(LLVM_SRC_ROOT)/test/Scripts" \
- --path "$(LLVMGCCDIR)/bin" \
- $(LIT_ARGS) $(LIT_ALL_TESTSUITES) )
+ $(LLVM_SRC_ROOT)/utils/lit/lit.py $(LIT_ARGS) $(LIT_ALL_TESTSUITES) )
ifdef TESTONE
CLEANED_TESTONE := $(patsubst %/,%,$(TESTONE))
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=86452&r1=86451&r2=86452&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Sun Nov 8 03:08:00 2009
@@ -22,6 +22,31 @@
if llvm_obj_root is not None:
config.test_exec_root = os.path.join(llvm_obj_root, 'test')
+# Tweak the PATH to include the scripts dir, the tools dir, and the llvm-gcc bin
+# dir (if available).
+if llvm_obj_root is not None:
+ llvm_src_root = getattr(config, 'llvm_src_root', None)
+ if not llvm_src_root:
+ lit.fatal('No LLVM source root set!')
+ path = os.path.pathsep.join((os.path.join(llvm_src_root, 'test',
+ 'Scripts'),
+ config.environment['PATH']))
+ config.environment['PATH'] = path
+
+ llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
+ if not llvm_tools_dir:
+ lit.fatal('No LLVM tools dir set!')
+ path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
+ config.environment['PATH'] = path
+
+ llvmgcc_dir = getattr(config, 'llvmgcc_dir', None)
+ if not llvm_tools_dir:
+ lit.fatal('No llvm-gcc dir set!')
+ if llvmgcc_dir:
+ path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'),
+ config.environment['PATH']))
+ config.environment['PATH'] = path
+
###
import os
More information about the llvm-commits
mailing list