[llvm-commits] [polly] r169487 - in /polly/trunk/test: CMakeLists.txt lit.site.cfg.in
Andy Gibbs
andyg1001 at hotmail.co.uk
Wed Dec 5 23:59:19 PST 2012
Author: andyg
Date: Thu Dec 6 01:59:18 2012
New Revision: 169487
URL: http://llvm.org/viewvc/llvm-project?rev=169487&view=rev
Log:
Integrate polly test-suite into an llvm "make check-all" if built as part of the whole using cmake.
Modified:
polly/trunk/test/CMakeLists.txt
polly/trunk/test/lit.site.cfg.in
Modified: polly/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CMakeLists.txt?rev=169487&r1=169486&r2=169487&view=diff
==============================================================================
--- polly/trunk/test/CMakeLists.txt (original)
+++ polly/trunk/test/CMakeLists.txt Thu Dec 6 01:59:18 2012
@@ -14,6 +14,7 @@
set(LLVM_SHLIBEXT "${CMAKE_SHARED_MODULE_SUFFIX}")
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+
# We are building polly out of tree, adjust the settings.
# FIXME: FileCheck is not available in llvm install directory at the moment.
set(LLVM_LIT ${LLVM_INSTALL_ROOT}/bin/llvm-lit)
@@ -23,50 +24,65 @@
set(LLVM_TOOLS_DIR "${LLVM_INSTALL_ROOT}/bin")
set(LLVM_LIBS_DIR "${LLVM_INSTALL_ROOT}/lib")
set(POLLY_LIB_DIR "${POLLY_BINARY_DIR}/lib")
+
+ include(FindPythonInterp)
+ if(PYTHONINTERP_FOUND)
+ option(POLLY_TEST_DISABLE_BAR "Run Polly tests with --no-progress-bar" OFF)
+ set(POLLY_TEST_EXTRA_ARGS)
+ if (MSVC OR XCODE OR POLLY_TEST_DISABLE_BAR)
+ set(POLLY_TEST_EXTRA_ARGS "--no-progress-bar")
+ endif()
+
+ option(POLLY_TEST_USE_VG "Run Polly tests under Valgrind" OFF)
+ if(POLLY_TEST_USE_VG)
+ set(POLLY_TEST_EXTRA_ARGS ${POLLY_TEST_EXTRA_ARGS} "--vg")
+ endif ()
+
+ foreach(testdir ${POLLY_TEST_DIRECTORIES})
+ add_custom_target(polly-test-${testdir}
+ COMMAND ${LLVM_LIT}
+ --param polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+ --param build_config=${CMAKE_CFG_INTDIR}
+ -sv ${POLLY_TEST_EXTRA_ARGS}
+ ${CMAKE_CURRENT_BINARY_DIR}/${testdir}
+ DEPENDS ${POLLY_TEST_DEPS}
+ COMMENT "Running Polly regression tests in ${testdir}")
+ endforeach()
+
+ add_custom_target(check-polly
+ COMMAND ${LLVM_LIT}
+ --param polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+ --param build_config=${CMAKE_CFG_INTDIR}
+ -sv ${POLLY_TEST_EXTRA_ARGS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS ${POLLY_TEST_DEPS}
+ COMMENT "Running Polly regression tests")
+ endif()
+
else (NOT DEFINED LLVM_MAIN_SRC_DIR)
+
set(LLVM_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit)
set(POLLY_TEST_DEPS opt lli LLVMPolly FileCheck not)
set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}")
- set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/")
+ set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}")
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib")
set(POLLY_LIB_DIR "${LLVM_LIBS_DIR}")
+
+ add_lit_testsuite(check-polly "Running polly regression tests"
+ ${CMAKE_CURRENT_BINARY_DIR}
+ PARAMS polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+ DEPENDS ${POLLY_TEST_DEPS}
+ )
+
+ set_target_properties(check-polly PROPERTIES FOLDER "polly tests")
+
endif (NOT DEFINED LLVM_MAIN_SRC_DIR)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
-include(FindPythonInterp)
-if(PYTHONINTERP_FOUND)
- option(POLLY_TEST_DISABLE_BAR "Run Polly tests with --no-progress-bar" OFF)
- set(POLLY_TEST_EXTRA_ARGS)
- if (MSVC OR XCODE OR POLLY_TEST_DISABLE_BAR)
- set(POLLY_TEST_EXTRA_ARGS "--no-progress-bar")
- endif()
-
- option(POLLY_TEST_USE_VG "Run Polly tests under Valgrind" OFF)
- if(POLLY_TEST_USE_VG)
- set(POLLY_TEST_EXTRA_ARGS ${POLLY_TEST_EXTRA_ARGS} "--vg")
- endif ()
-
- foreach(testdir ${POLLY_TEST_DIRECTORIES})
- add_custom_target(polly-test-${testdir}
- COMMAND ${LLVM_LIT}
- --param polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
- --param build_config=${CMAKE_CFG_INTDIR}
- -sv ${POLLY_TEST_EXTRA_ARGS}
- ${CMAKE_CURRENT_BINARY_DIR}/${testdir}
- DEPENDS ${POLLY_TEST_DEPS}
- COMMENT "Running Polly regression tests in ${testdir}")
- endforeach()
-
- add_custom_target(polly-test
- COMMAND ${LLVM_LIT}
- --param polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
- --param build_config=${CMAKE_CFG_INTDIR}
- -sv ${POLLY_TEST_EXTRA_ARGS}
- ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${POLLY_TEST_DEPS}
- COMMENT "Running Polly regression tests")
-endif()
+# Add a legacy target spelling: polly-test
+add_custom_target(polly-test)
+add_dependencies(polly-test check-polly)
Modified: polly/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/lit.site.cfg.in?rev=169487&r1=169486&r2=169487&view=diff
==============================================================================
--- polly/trunk/test/lit.site.cfg.in (original)
+++ polly/trunk/test/lit.site.cfg.in Thu Dec 6 01:59:18 2012
@@ -9,7 +9,6 @@
config.target_triple = "@TARGET_TRIPLE@"
config.enable_gpgpu_codegen = "@CUDALIB_FOUND@"
config.cloog_found = "@CLOOG_FOUND@"
-lit.params['build_config'] = "@POLLY_SOURCE_DIR@/test"
## Check the current platform with regex
import re
More information about the llvm-commits
mailing list