summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorRaffi Enficiaud <raffi.enficiaud@mines-paris.org>2015-04-21 20:48:37 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-23 13:03:10 (GMT)
commit75b0e1679c39ca824a4c49d9e1a2ae2b5f04ae06 (patch)
treead0adcba48eb69edc50c2d2c9718f1434e6e1597 /Tests/CMakeLists.txt
parentfdfe4586a047d9b6cc64efdd22fbdc67e9f1193f (diff)
downloadCMake-75b0e1679c39ca824a4c49d9e1a2ae2b5f04ae06.zip
CMake-75b0e1679c39ca824a4c49d9e1a2ae2b5f04ae06.tar.gz
CMake-75b0e1679c39ca824a4c49d9e1a2ae2b5f04ae06.tar.bz2
CPackDeb: Add basic package tests
Tests of generated component based deb packages with lintian and dpkg. Also includes basic file name check.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 699b616..f1379e6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1003,6 +1003,40 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackComponentsForAll/build${CPackGen}-${CPackComponentWay}")
endforeach()
endforeach()
+
+ # debian specific
+ if(DPKG_EXECUTABLE)
+ unset(CPackRun_CPackDEBConfiguration_ALL_CONFIGS)
+ set(DEB_TEST_NAMES "CPackComponentsDEB")
+ set(DEB_CONFIGURATIONS_TO_TEST "components-lintian-dpkgdeb-checks")
+ set(CPackGen "DEB")
+ set(CPackRun_CPackGen "-DCPackGen=${CPackGen}")
+
+ foreach(CPackDEBConfiguration IN LISTS DEB_CONFIGURATIONS_TO_TEST)
+ set(CPackRun_CPackDEBConfiguration "-DCPackDEBConfiguration=${CPackDEBConfiguration}")
+ add_test(${DEB_TEST_NAMES}-${CPackDEBConfiguration}
+ ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/${DEB_TEST_NAMES}"
+ "${CMake_BINARY_DIR}/Tests/${DEB_TEST_NAMES}/build${CPackGen}-${CPackDEBConfiguration}"
+ ${build_generator_args}
+ --build-project CPackComponentsDEB
+ --build-options ${build_options}
+ -DCPACK_GENERATOR:STRING=${CPackGen}
+ -DCPACK_BINARY_${CPackGen}:BOOL=ON
+ ${CPackRun_CPackDEBConfiguration}
+ ${CPackRun_CPackDEBConfiguration_ALL_CONFIGS}
+ --graphviz=${DEB_TEST_NAMES}.dot
+ --test-command ${CMAKE_CMAKE_COMMAND}
+ "-D${DEB_TEST_NAMES}_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}/Tests/${DEB_TEST_NAMES}"
+ "-D${DEB_TEST_NAMES}_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/${DEB_TEST_NAMES}/build${CPackGen}-${CPackDEBConfiguration}"
+ "${CPackRun_CPackGen}"
+ "${CPackRun_CPackDEBConfiguration}"
+ -P "${CMake_SOURCE_DIR}/Tests/${DEB_TEST_NAMES}/RunCPackVerifyResult-${CPackDEBConfiguration}.cmake")
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${DEB_TEST_NAMES}/build${CPackGen}-${CPackDEBConfiguration}")
+ endforeach()
+ endif()
+
endif()
# By default, turn this test off (because it takes a long time...)