summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-30 12:50:21 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-30 12:50:21 (GMT)
commitda00080ed495535c4ca1a20c3133f4830c32b4a3 (patch)
tree1e4062fa69696804d49afa58b3f2811623959541
parent0504fc8d84f00431d30e68c685d4ca86ed18133a (diff)
parent9ce00caee3639cda96ea7bc0310d6fa0aad7631b (diff)
downloadCMake-da00080ed495535c4ca1a20c3133f4830c32b4a3.zip
CMake-da00080ed495535c4ca1a20c3133f4830c32b4a3.tar.gz
CMake-da00080ed495535c4ca1a20c3133f4830c32b4a3.tar.bz2
Merge branch 'cpack-rpm-dist-test-fix' into release-3.10
Merge-request: !1424
-rw-r--r--Tests/RunCMake/CPack/tests/DIST/VerifyResult.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/tests/DIST/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/DIST/VerifyResult.cmake
index 7375ecc..1b2eb48 100644
--- a/Tests/RunCMake/CPack/tests/DIST/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/DIST/VerifyResult.cmake
@@ -5,6 +5,11 @@ execute_process(COMMAND ${RPMBUILD_EXECUTABLE} -E %{?dist}
set(whitespaces_ "[\t\n\r ]*")
+# since we have no control over dist tag value we should try to escape
+# the content for use as a regular expression
+string(REPLACE "+" "\\+" DIST_TAG "${DIST_TAG}")
+string(REPLACE "." "\\." DIST_TAG "${DIST_TAG}")
+
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_}'")