summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-08 14:22:28 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2011-03-08 14:22:28 -0500
commit5148d0b92d8e5b6ff3061f1e0a3d1bc4b00a0f8f (patch)
tree055826d35754aa6dd07d07db980bfa7fb8830b9f
parent9c1344f33bde890f7cec13962f477a914ae716c5 (diff)
parentdc9965f9a05f23615300c6ffa00b1b35b8afd58e (diff)
downloadcmake-5148d0b92d8e5b6ff3061f1e0a3d1bc4b00a0f8f.tar.gz
cmake-5148d0b92d8e5b6ff3061f1e0a3d1bc4b00a0f8f.tar.xz
cmake-5148d0b92d8e5b6ff3061f1e0a3d1bc4b00a0f8f.zip
Merge topic 'CPackRPM-enableCPackTests'
dc9965f CPackRPM do not run test if build dir contains space e4d4dfc CPackRPM activate CPackRPM test on Linux systems where rpmbuild is found
-rw-r--r--Tests/CMakeLists.txt6
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake17
2 files changed, 23 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index d025b1ea8..7235e1d5e 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -566,6 +566,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
set(CPackRun_CPackCommand "-DCPackCommand=${CMAKE_CPACK_COMMAND}")
# set up list of CPack generators
list(APPEND GENLST "ZIP")
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
+ find_program(RPMBUILD NAMES rpmbuild)
+ endif(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
+ if (RPMBUILD)
+ list(APPEND GENLST "RPM")
+ endif(RPMBUILD)
# set up list of component packaging ways
list(APPEND CWAYLST "default")
list(APPEND CWAYLST "OnePackPerGroup")
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index e797b7cd6..1fac23212 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -50,6 +50,23 @@ if(CPackGen MATCHES "ZIP")
if (${CPackComponentWay} STREQUAL "AllGroupsInOne")
set(expected_count 1)
endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
+elseif (CPackGen MATCHES "RPM")
+ set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.rpm")
+ if (${CPackComponentWay} STREQUAL "default")
+ set(expected_count 1)
+ endif(${CPackComponentWay} STREQUAL "default")
+ if (${CPackComponentWay} STREQUAL "OnePackPerGroup")
+ set(expected_count 2)
+ endif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
+ if (${CPackComponentWay} STREQUAL "IgnoreGroup")
+ set(expected_count 4)
+ endif (${CPackComponentWay} STREQUAL "IgnoreGroup")
+ if (${CPackComponentWay} STREQUAL "AllInOne")
+ set(expected_count 1)
+ endif (${CPackComponentWay} STREQUAL "AllInOne")
+ if (${CPackComponentWay} STREQUAL "AllGroupsInOne")
+ set(expected_count 1)
+ endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
endif(CPackGen MATCHES "ZIP")
# clean-up previously CPack generated files