[Cmake-commits] [cmake-commits] david.cole committed CMakeLists.txt 1.132 1.133

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Oct 20 14:31:12 EDT 2009


Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv11371/Tests

Modified Files:
	CMakeLists.txt 
Log Message:
Add test of all available CPack generators. Add this test with the goal of increasing coverage of the cpack source code, even/especially when the underlying packager tool is not installed. The test does not fail if there is a cpack problem with a certain generator. I expect some generators will fail on every machine running a CMake dashboard.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeLists.txt,v
retrieving revision 1.132
retrieving revision 1.133
diff -C 2 -d -r1.132 -r1.133
*** CMakeLists.txt	20 Oct 2009 17:35:30 -0000	1.132
--- CMakeLists.txt	20 Oct 2009 18:31:10 -0000	1.133
***************
*** 457,460 ****
--- 457,494 ----
    ENDIF(CTEST_RUN_CPackComponents)
  
+   # By default, turn this test off (because it takes a long time...)
+   #
+   if(NOT DEFINED CTEST_RUN_CPackTestAllGenerators)
+     set(CTEST_RUN_CPackTestAllGenerators OFF)
+ 
+     # ...but: if it appears to be a coverage dashboard, or long tests are
+     # on, then set it to the generic CTEST_TEST_CPACK setting.
+     #
+     if(CMAKE_CXX_FLAGS MATCHES "-ftest-coverage" OR
+       NOT "$ENV{COVFILE}" STREQUAL "" OR
+       CMAKE_RUN_LONG_TESTS)
+       set(CTEST_RUN_CPackTestAllGenerators ${CTEST_TEST_CPACK})
+     endif(CMAKE_CXX_FLAGS MATCHES "-ftest-coverage" OR
+       NOT "$ENV{COVFILE}" STREQUAL "" OR
+       CMAKE_RUN_LONG_TESTS)
+   endif(NOT DEFINED CTEST_RUN_CPackTestAllGenerators)
+ 
+   IF(CTEST_RUN_CPackTestAllGenerators)
+     ADD_TEST(CPackTestAllGenerators ${CMAKE_CTEST_COMMAND}
+       --build-and-test
+       "${CMake_SOURCE_DIR}/Tests/CPackTestAllGenerators"
+       "${CMake_BINARY_DIR}/Tests/CPackTestAllGenerators"
+       --build-generator ${CMAKE_TEST_GENERATOR}
+       --build-project CPackTestAllGenerators
+       --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+       --test-command
+       ${CMAKE_CMAKE_COMMAND}
+         -D dir=${CMake_BINARY_DIR}/Tests/CPackTestAllGenerators
+         -D cpack=${CMAKE_CPACK_COMMAND}
+         -P ${CMake_SOURCE_DIR}/Tests/CPackTestAllGenerators/RunCPack.cmake
+       )
+     LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackTestAllGenerators")
+   ENDIF(CTEST_RUN_CPackTestAllGenerators)
+ 
    IF(CTEST_package_X11_TEST)
      SET(X11_build_target_arg --build-target package)



More information about the Cmake-commits mailing list