summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack/tests/RPM_DIST
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-11-26 19:37:07 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2016-11-27 22:20:35 (GMT)
commit8575affa4c72e1c0d07f964d2f28eb6ddbadb291 (patch)
treec3a77601235a27d120bc983cbc56cdc493d7aa26 /Tests/RunCMake/CPack/tests/RPM_DIST
parent79443e1b8b604de00d269e73a977f449bc3fcef2 (diff)
downloadCMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.zip
CMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.tar.gz
CMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.tar.bz2
Tests: CPack test move and merge VerifyResult
Merge VerifyResult of different generators pertest and move the file to its test dir.
Diffstat (limited to 'Tests/RunCMake/CPack/tests/RPM_DIST')
-rw-r--r--Tests/RunCMake/CPack/tests/RPM_DIST/VerifyResult.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/tests/RPM_DIST/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/RPM_DIST/VerifyResult.cmake
new file mode 100644
index 0000000..7375ecc
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/RPM_DIST/VerifyResult.cmake
@@ -0,0 +1,11 @@
+execute_process(COMMAND ${RPMBUILD_EXECUTABLE} -E %{?dist}
+ OUTPUT_VARIABLE DIST_TAG
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+set(whitespaces_ "[\t\n\r ]*")
+
+getPackageInfo("${FOUND_FILE_1}" "FILE_INFO_")
+if(NOT FILE_INFO_ MATCHES ".*Release${whitespaces_}:${whitespaces_}1${DIST_TAG}")
+ message(FATAL_ERROR "Unexpected Release in '${FOUND_FILE_1}'; file info: '${FILE_INFO_}'")
+endif()