mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
Tests: Format RunCPackVerifyResult.cmake more consistently
This commit is contained in:
@@ -38,57 +38,57 @@ set(config_verbose )
|
||||
|
||||
if(CPackGen MATCHES "ZIP")
|
||||
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.zip")
|
||||
if (${CPackComponentWay} STREQUAL "default")
|
||||
if(${CPackComponentWay} STREQUAL "default")
|
||||
set(expected_count 1)
|
||||
elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
set(expected_count 3)
|
||||
elseif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
set(expected_count 4)
|
||||
elseif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
elseif(${CPackComponentWay} STREQUAL "AllInOne")
|
||||
set(expected_count 1)
|
||||
endif ()
|
||||
elseif (CPackGen MATCHES "RPM")
|
||||
endif()
|
||||
elseif(CPackGen MATCHES "RPM")
|
||||
set(config_verbose -D "CPACK_RPM_PACKAGE_DEBUG=1")
|
||||
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.rpm")
|
||||
if (${CPackComponentWay} STREQUAL "default")
|
||||
if(${CPackComponentWay} STREQUAL "default")
|
||||
set(expected_count 1)
|
||||
elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
set(expected_count 3)
|
||||
elseif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
set(expected_count 4)
|
||||
elseif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
elseif(${CPackComponentWay} STREQUAL "AllInOne")
|
||||
set(expected_count 1)
|
||||
endif ()
|
||||
elseif (CPackGen MATCHES "DEB")
|
||||
endif()
|
||||
elseif(CPackGen MATCHES "DEB")
|
||||
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/mylib*_1.0.2_*.deb")
|
||||
if (${CPackComponentWay} STREQUAL "default")
|
||||
if(${CPackComponentWay} STREQUAL "default")
|
||||
set(expected_count 1)
|
||||
elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
set(expected_count 3)
|
||||
elseif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
set(expected_count 4)
|
||||
elseif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
elseif(${CPackComponentWay} STREQUAL "AllInOne")
|
||||
set(expected_count 1)
|
||||
endif ()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CPackGen MATCHES "DragNDrop")
|
||||
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.dmg")
|
||||
if (${CPackComponentWay} STREQUAL "default")
|
||||
if(${CPackComponentWay} STREQUAL "default")
|
||||
set(expected_count 1)
|
||||
elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
set(expected_count 3)
|
||||
elseif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
set(expected_count 4)
|
||||
elseif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
elseif(${CPackComponentWay} STREQUAL "AllInOne")
|
||||
set(expected_count 1)
|
||||
endif ()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# clean-up previously CPack generated files
|
||||
if(expected_file_mask)
|
||||
file(GLOB expected_file "${expected_file_mask}")
|
||||
if (expected_file)
|
||||
if(expected_file)
|
||||
file(REMOVE ${expected_file})
|
||||
endif()
|
||||
endif()
|
||||
@@ -101,7 +101,7 @@ execute_process(COMMAND ${CMAKE_CPACK_COMMAND} ${config_verbose} -G ${CPackGen}
|
||||
ERROR_VARIABLE CPack_error
|
||||
WORKING_DIRECTORY ${CPackComponentsForAll_BINARY_DIR})
|
||||
|
||||
if (CPack_result)
|
||||
if(CPack_result)
|
||||
message(FATAL_ERROR "error: CPack execution went wrong!, CPack_output=${CPack_output}, CPack_error=${CPack_error}")
|
||||
else ()
|
||||
message(STATUS "CPack_output=${CPack_output}")
|
||||
|
||||
Reference in New Issue
Block a user