summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsForAll
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CPackComponentsForAll')
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 253d128..7ab8820 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -88,12 +88,14 @@ if(CPackGen MATCHES "DragNDrop")
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.dmg")
if(${CPackComponentWay} STREQUAL "default")
set(expected_count 1)
+ set(expect_dmg_sla 1)
elseif(${CPackComponentWay} STREQUAL "OnePackPerGroup")
set(expected_count 3)
elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
set(expected_count 4)
elseif(${CPackComponentWay} STREQUAL "AllInOne")
set(expected_count 1)
+ set(expect_dmg_sla 1)
endif()
endif()
@@ -138,6 +140,20 @@ if(expected_file_mask)
if(NOT actual_count EQUAL expected_count)
message(FATAL_ERROR "error: expected_count=${expected_count} does not match actual_count=${actual_count}: CPackComponents test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error})")
endif()
+
+ if(expect_dmg_sla)
+ execute_process(COMMAND hdiutil udifderez -xml "${expected_file}" OUTPUT_VARIABLE out ERROR_VARIABLE err RESULT_VARIABLE res)
+ if(NOT res EQUAL 0)
+ string(REPLACE "\n" "\n " err " ${err}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${expected_file}\nfailed with:\n${err}")
+ endif()
+ foreach(key "LPic" "STR#" "TEXT")
+ if(NOT out MATCHES "<key>${key}</key>")
+ string(REPLACE "\n" "\n " out " ${out}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${expected_file}\ndid not show '${key}' key:\n${out}")
+ endif()
+ endforeach()
+ endif()
endif()
# Validate content