summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack/RPM
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-05-15 01:01:34 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2016-05-15 01:01:34 (GMT)
commit44ee2d717a0f0552d4d1d5978c473d60625a0b3c (patch)
tree058d32470b4afd1e3b37c411db51fd90347c6c50 /Tests/RunCMake/CPack/RPM
parentb952336902e9206ba51e1d77b8e489bdd759f73f (diff)
downloadCMake-44ee2d717a0f0552d4d1d5978c473d60625a0b3c.zip
CMake-44ee2d717a0f0552d4d1d5978c473d60625a0b3c.tar.gz
CMake-44ee2d717a0f0552d4d1d5978c473d60625a0b3c.tar.bz2
CPack/RPM different package names
Packagers may now set their own rpm package file names or request that rpmbuild tool chooses one for them. It also supports handing of situations where one spec file may produce multiple rpm packages.
Diffstat (limited to 'Tests/RunCMake/CPack/RPM')
-rw-r--r--Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-ExpectedFiles.cmake9
-rw-r--r--Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-stderr.txt3
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-ExpectedFiles.cmake
new file mode 100644
index 0000000..780e57e
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-ExpectedFiles.cmake
@@ -0,0 +1,9 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "3")
+set(EXPECTED_FILE_1 "custom_names-pkg_1*.rpm")
+set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$")
+set(EXPECTED_FILE_2 "second*.rpm")
+set(EXPECTED_FILE_CONTENT_2 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$")
+set(EXPECTED_FILE_3 "pkg_3_abc.rpm")
+set(EXPECTED_FILE_CONTENT_3 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$")
diff --git a/Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-stderr.txt b/Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-stderr.txt
new file mode 100644
index 0000000..d3ba7b0
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/RPM_CUSTOM_NAMES-stderr.txt
@@ -0,0 +1,3 @@
+^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/RPM_CUSTOM_NAMES-build/_CPack_Packages/.*/RPM/SPECS/custom_names-pkg_1.spec
+CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/RPM_CUSTOM_NAMES-build/_CPack_Packages/.*/RPM/SPECS/second.spec
+CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/RPM_CUSTOM_NAMES-build/_CPack_Packages/.*/RPM/SPECS/custom_names-pkg_3.spec$