From 0f15aee799a0af9fe1999d5c071483c9660ccf5b Mon Sep 17 00:00:00 2001 From: Domen Vrankar Date: Sat, 26 Nov 2016 19:53:59 +0100 Subject: Tests: CPack test move ExpectedFiles script Merge per generator ExpectedFiles scripts into one per test and move it to test dir. --- .../DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake | 5 ---- .../CPack/DEB/CUSTOM_NAMES-ExpectedFiles.cmake | 9 ------- .../CPack/DEB/DEB_EXTRA-ExpectedFiles.cmake | 9 ------- .../DEB/DEB_GENERATE_SHLIBS-ExpectedFiles.cmake | 6 ----- ...EB_GENERATE_SHLIBS_LDCONFIG-ExpectedFiles.cmake | 6 ----- .../CPack/DEB/DEPENDENCIES-ExpectedFiles.cmake | 14 ---------- .../CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake | 5 ---- .../CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake | 5 ---- .../RunCMake/CPack/DEB/MINIMAL-ExpectedFiles.cmake | 5 ---- .../DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake | 9 ------- .../RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake | 5 ---- .../CPack/RPM/CUSTOM_NAMES-ExpectedFiles.cmake | 9 ------- .../CPack/RPM/DEBUGINFO-ExpectedFiles.cmake | 14 ---------- .../CPack/RPM/DEPENDENCIES-ExpectedFiles.cmake | 13 ---------- .../CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake | 5 ---- .../CPack/RPM/INSTALL_SCRIPTS-ExpectedFiles.cmake | 7 ----- .../CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake | 13 ---------- .../RunCMake/CPack/RPM/MINIMAL-ExpectedFiles.cmake | 5 ---- ...RTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake | 5 ---- .../RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake | 9 ------- .../CPack/RPM/RPM_DIST-ExpectedFiles.cmake | 5 ---- .../CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake | 5 ---- .../CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake | 30 ---------------------- .../CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake | 5 ---- .../TGZ/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake | 3 --- .../CPack/TGZ/EMPTY_DIR-ExpectedFiles.cmake | 3 --- .../RunCMake/CPack/TGZ/MINIMAL-ExpectedFiles.cmake | 5 ---- .../CPack/TGZ/PACKAGE_CHECKSUM-ExpectedFiles.cmake | 9 ------- Tests/RunCMake/CPack/VerifyResult.cmake | 2 +- .../tests/COMPONENTS_EMPTY_DIR/ExpectedFiles.cmake | 14 ++++++++++ .../CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake | 19 ++++++++++++++ .../CPack/tests/DEBUGINFO/ExpectedFiles.cmake | 14 ++++++++++ .../CPack/tests/DEB_EXTRA/ExpectedFiles.cmake | 9 +++++++ .../tests/DEB_GENERATE_SHLIBS/ExpectedFiles.cmake | 6 +++++ .../ExpectedFiles.cmake | 6 +++++ .../CPack/tests/DEPENDENCIES/ExpectedFiles.cmake | 28 ++++++++++++++++++++ .../CPack/tests/EMPTY_DIR/ExpectedFiles.cmake | 14 ++++++++++ .../tests/INSTALL_SCRIPTS/ExpectedFiles.cmake | 7 +++++ .../CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake | 5 ++++ .../CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake | 13 ++++++++++ .../CPack/tests/MINIMAL/ExpectedFiles.cmake | 14 ++++++++++ .../tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake | 9 +++++++ .../ExpectedFiles.cmake | 5 ++++ .../tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake | 19 ++++++++++++++ .../CPack/tests/RPM_DIST/ExpectedFiles.cmake | 5 ++++ .../CPack/tests/RPM_SUGGESTS/ExpectedFiles.cmake | 5 ++++ .../tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake | 30 ++++++++++++++++++++++ .../CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake | 5 ++++ 48 files changed, 228 insertions(+), 224 deletions(-) delete mode 100644 Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/DEB_EXTRA-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/DEPENDENCIES-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/MINIMAL-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/DEPENDENCIES-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/MINIMAL-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/TGZ/EMPTY_DIR-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/TGZ/MINIMAL-ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/DEB_EXTRA/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS_LDCONFIG/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/RPM_DIST/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/RPM_SUGGESTS/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake diff --git a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index 62f2f9c..0000000 --- a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "components_empty_dir-test_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$") diff --git a/Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-ExpectedFiles.cmake deleted file mode 100644 index 2acf45b..0000000 --- a/Tests/RunCMake/CPack/DEB/CUSTOM_NAMES-ExpectedFiles.cmake +++ /dev/null @@ -1,9 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "3") -set(EXPECTED_FILE_1 "custom_names-pkg_1_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_2 "second*.deb") -set(EXPECTED_FILE_CONTENT_2 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_3 "pkg_3_abc.deb") -set(EXPECTED_FILE_CONTENT_3 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-ExpectedFiles.cmake deleted file mode 100644 index 4531a34..0000000 --- a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-ExpectedFiles.cmake +++ /dev/null @@ -1,9 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "3") -set(EXPECTED_FILE_1 "deb_extra-foo_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_2 "deb_extra-bar_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_2 "^.*/usr/${whitespaces_}.*/usr/bar/${whitespaces_}.*/usr/bar/CMakeLists.txt$") -set(EXPECTED_FILE_3 "deb_extra-bas_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_3 "^.*/usr/${whitespaces_}.*/usr/bas/${whitespaces_}.*/usr/bas/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-ExpectedFiles.cmake deleted file mode 100644 index 32a2327..0000000 --- a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-ExpectedFiles.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "deb_generate_shlibs_0.1.1-1_*.deb") -# dynamic lib extension is .so on Linux and .dylib on Mac so we will use a wildcard .* for it -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/libtest_lib\\..*$") diff --git a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-ExpectedFiles.cmake deleted file mode 100644 index 4966818..0000000 --- a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-ExpectedFiles.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "deb_generate_shlibs_ldconfig_0.1.1-1_*.deb") -# dynamic lib extension is .so on Linux and .dylib on Mac so we will use a wildcard .* for it -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/lib${whitespaces_}.*/usr/lib/libtest_lib\\..*$") diff --git a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/DEPENDENCIES-ExpectedFiles.cmake deleted file mode 100644 index a6f08fe..0000000 --- a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-ExpectedFiles.cmake +++ /dev/null @@ -1,14 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "5") -set(EXPECTED_FILE_1 "dependencies-0.1.1-*-applications.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/test_prog$") -set(EXPECTED_FILE_2 "dependencies-0.1.1-*-applications_auto.deb") -set(EXPECTED_FILE_CONTENT_2 "^.*/usr/foo_auto${whitespaces_}.*/usr/foo_auto/test_prog$") -set(EXPECTED_FILE_3 "dependencies-0.1.1-*-headers.deb") -set(EXPECTED_FILE_CONTENT_3 "^.*/usr/bar${whitespaces_}.*/usr/bar/CMakeLists.txt$") -set(EXPECTED_FILE_4 "dependencies-0.1.1-*-libs.deb") -# dynamic lib extension is .so on Linux and .dylib on Mac so we will use a wildcard .* for it -set(EXPECTED_FILE_CONTENT_4 "^.*/usr/bas${whitespaces_}.*/usr/bas/libtest_lib\\..*$") -set(EXPECTED_FILE_5 "dependencies-0.1.1-*-libs_auto.deb") -set(EXPECTED_FILE_CONTENT_5 "^.*/usr/bas_auto${whitespaces_}.*/usr/bas_auto/libtest_lib\\..*$") diff --git a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index 6dc5906..0000000 --- a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "empty_dir_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$") diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake deleted file mode 100644 index dd72cf7..0000000 --- a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "long_filenames_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt$") diff --git a/Tests/RunCMake/CPack/DEB/MINIMAL-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/MINIMAL-ExpectedFiles.cmake deleted file mode 100644 index 648c866..0000000 --- a/Tests/RunCMake/CPack/DEB/MINIMAL-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "minimal_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake deleted file mode 100644 index 11586a8..0000000 --- a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake +++ /dev/null @@ -1,9 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "3") -set(EXPECTED_FILE_1 "per_component_fields-pkg_1_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_2 "second_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_2 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_3 "per_component_fields-pkg_3_0.1.1-1_*.deb") -set(EXPECTED_FILE_CONTENT_3 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index d396276..0000000 --- a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "components_empty_dir*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$") diff --git a/Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-ExpectedFiles.cmake deleted file mode 100644 index 780e57e..0000000 --- a/Tests/RunCMake/CPack/RPM/CUSTOM_NAMES-ExpectedFiles.cmake +++ /dev/null @@ -1,9 +0,0 @@ -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/DEBUGINFO-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake deleted file mode 100644 index a583e32..0000000 --- a/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake +++ /dev/null @@ -1,14 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "5") -set(EXPECTED_FILE_1 "debuginfo-applications-0*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") -set(EXPECTED_FILE_2 "debuginfo*-headers.rpm") -set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") -set(EXPECTED_FILE_3 "debuginfo*-libs.rpm") -set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") - -set(EXPECTED_FILE_4 "debuginfo-applications-debuginfo*.rpm") -set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") -set(EXPECTED_FILE_5 "debuginfo-libs-debuginfo*.rpm") -set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*") diff --git a/Tests/RunCMake/CPack/RPM/DEPENDENCIES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/DEPENDENCIES-ExpectedFiles.cmake deleted file mode 100644 index cf85dab..0000000 --- a/Tests/RunCMake/CPack/RPM/DEPENDENCIES-ExpectedFiles.cmake +++ /dev/null @@ -1,13 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "5") -set(EXPECTED_FILE_1 "dependencies*-applications.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") -set(EXPECTED_FILE_2 "dependencies*-applications_auto.rpm") -set(EXPECTED_FILE_CONTENT_2 "^/usr/foo_auto${whitespaces_}/usr/foo_auto/test_prog$") -set(EXPECTED_FILE_3 "dependencies*-headers.rpm") -set(EXPECTED_FILE_CONTENT_3 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") -set(EXPECTED_FILE_4 "dependencies*-libs.rpm") -set(EXPECTED_FILE_CONTENT_4 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") -set(EXPECTED_FILE_5 "dependencies*-libs_auto.rpm") -set(EXPECTED_FILE_CONTENT_5 "^/usr/bas_auto${whitespaces_}/usr/bas_auto/libtest_lib.so$") diff --git a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index 0c2977f..0000000 --- a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "empty_dir*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$") diff --git a/Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-ExpectedFiles.cmake deleted file mode 100644 index 033a45d..0000000 --- a/Tests/RunCMake/CPack/RPM/INSTALL_SCRIPTS-ExpectedFiles.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "2") -set(EXPECTED_FILE_1 "install_scripts*-foo.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_2 "install_scripts*-bar.rpm") -set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake deleted file mode 100644 index 69603dd..0000000 --- a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake +++ /dev/null @@ -1,13 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "0") - -if(NOT RunCMake_SUBTEST_SUFFIX STREQUAL "invalid") - set(EXPECTED_FILES_COUNT "3") - set(EXPECTED_FILE_1 "main_component-0.1.1-1.*.rpm") - set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") - set(EXPECTED_FILE_2 "main_component*-headers.rpm") - set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") - set(EXPECTED_FILE_3 "main_component*-libs.rpm") - set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/CMakeLists.txt$") -endif() diff --git a/Tests/RunCMake/CPack/RPM/MINIMAL-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/MINIMAL-ExpectedFiles.cmake deleted file mode 100644 index 800b78e..0000000 --- a/Tests/RunCMake/CPack/RPM/MINIMAL-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "minimal*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake deleted file mode 100644 index ddaa9db..0000000 --- a/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "partially_relocatable_warning-0.1.1-*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/not_relocatable${whitespaces_}/not_relocatable/CMakeLists.txt${whitespaces_}/opt$") diff --git a/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake deleted file mode 100644 index b02ab8d..0000000 --- a/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake +++ /dev/null @@ -1,9 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "3") -set(EXPECTED_FILE_1 "per_component_fields*-pkg_1.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_2 "per_component_fields*-pkg_2.rpm") -set(EXPECTED_FILE_CONTENT_2 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") -set(EXPECTED_FILE_3 "per_component_fields*-pkg_3.rpm") -set(EXPECTED_FILE_CONTENT_3 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake deleted file mode 100644 index 3b5a347..0000000 --- a/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "rpm_dist*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake deleted file mode 100644 index 02ebb44..0000000 --- a/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "rpm_suggests*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake deleted file mode 100644 index dc49343..0000000 --- a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake +++ /dev/null @@ -1,30 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "0") - -if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") - set(EXPECTED_FILES_COUNT "4") - set(EXPECTED_FILE_1 "single_debuginfo-0.1.1-1.*.rpm") - set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") - set(EXPECTED_FILE_2 "single_debuginfo*-headers.rpm") - set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") - set(EXPECTED_FILE_3 "single_debuginfo*-libs.rpm") - set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") - - set(EXPECTED_FILE_4 "single_debuginfo-debuginfo*.rpm") - set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*") -elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") - set(EXPECTED_FILES_COUNT "2") - set(EXPECTED_FILE_1 "single_debuginfo-0*-applications.rpm") - set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") - - set(EXPECTED_FILE_2 "single_debuginfo-applications-debuginfo*.rpm") - set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") -elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") - set(EXPECTED_FILES_COUNT "2") - set(EXPECTED_FILE_1 "single_debuginfo-0*.rpm") - set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") - - set(EXPECTED_FILE_2 "single_debuginfo-debuginfo*.rpm") - set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") -endif() diff --git a/Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake deleted file mode 100644 index d6811eb..0000000 --- a/Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "source_package*.src.rpm") -set(EXPECTED_FILE_CONTENT_1 "^source_package-0.1.1.tar.gz${whitespaces_}source_package.spec$") diff --git a/Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index 26e2ab0..0000000 --- a/Tests/RunCMake/CPack/TGZ/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "components_empty_dir*.tar.gz") -set(EXPECTED_FILE_CONTENT_1 "^[^\n]*empty/$") diff --git a/Tests/RunCMake/CPack/TGZ/EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/TGZ/EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index a75514a..0000000 --- a/Tests/RunCMake/CPack/TGZ/EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "empty_dir*.tar.gz") -set(EXPECTED_FILE_CONTENT_1 "^[^\n]*empty_dir-0.1.1-[^\n]*/empty/$") diff --git a/Tests/RunCMake/CPack/TGZ/MINIMAL-ExpectedFiles.cmake b/Tests/RunCMake/CPack/TGZ/MINIMAL-ExpectedFiles.cmake deleted file mode 100644 index 5c31f27..0000000 --- a/Tests/RunCMake/CPack/TGZ/MINIMAL-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "minimal*.tar.gz") -set(EXPECTED_FILE_CONTENT_1 "^[^\n]*minimal-0.1.1-[^\n]*/foo/\n[^\n]*minimal-0.1.1-[^\n]*/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-ExpectedFiles.cmake b/Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-ExpectedFiles.cmake deleted file mode 100644 index 205dcd8..0000000 --- a/Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-ExpectedFiles.cmake +++ /dev/null @@ -1,9 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "0") - -if (NOT ${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid") - set(EXPECTED_FILES_COUNT "1") - set(EXPECTED_FILE_1 "package_checksum*.tar.gz") - set(EXPECTED_FILE_CONTENT_1 "^[^\n]*package_checksum*-[^\n]*/foo/\n[^\n]*package_checksum-[^\n]*/foo/CMakeLists.txt$") -endif() diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake index 539cef6..803b4bc 100644 --- a/Tests/RunCMake/CPack/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/VerifyResult.cmake @@ -11,7 +11,7 @@ set(output_error_message "\nCPack output: '${output}'\nCPack error: '${error}';\nCPack result: '${PACKAGING_RESULT}';\nconfig file: '${config_file_content}'") # check that expected generated files exist and contain expected content -include("${src_dir}/${GENERATOR_TYPE}/${RunCMake_TEST_FILE_PREFIX}-ExpectedFiles.cmake") +include("${src_dir}/tests/${RunCMake_TEST_FILE_PREFIX}/ExpectedFiles.cmake") if(NOT EXPECTED_FILES_COUNT EQUAL 0) foreach(file_no_ RANGE 1 ${EXPECTED_FILES_COUNT}) diff --git a/Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/ExpectedFiles.cmake new file mode 100644 index 0000000..f42d8b1 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/COMPONENTS_EMPTY_DIR/ExpectedFiles.cmake @@ -0,0 +1,14 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") + +if(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_1 "components_empty_dir-test_0.1.1-1_*.deb") + set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$") +elseif(GENERATOR_TYPE STREQUAL "RPM") + set(EXPECTED_FILE_1 "components_empty_dir*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$") +elseif(GENERATOR_TYPE STREQUAL "TGZ") + set(EXPECTED_FILE_1 "components_empty_dir*.tar.gz") + set(EXPECTED_FILE_CONTENT_1 "^[^\n]*empty/$") +endif() diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake new file mode 100644 index 0000000..c0389ba --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake @@ -0,0 +1,19 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "3") + +if(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_1 "custom_names-pkg_1_0.1.1-1_*.deb") + set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_2 "second*.deb") + set(EXPECTED_FILE_CONTENT_2 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_3 "pkg_3_abc.deb") + set(EXPECTED_FILE_CONTENT_3 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") +elseif(GENERATOR_TYPE STREQUAL "RPM") + 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$") +endif() diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake new file mode 100644 index 0000000..a583e32 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake @@ -0,0 +1,14 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "5") +set(EXPECTED_FILE_1 "debuginfo-applications-0*.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") +set(EXPECTED_FILE_2 "debuginfo*-headers.rpm") +set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") +set(EXPECTED_FILE_3 "debuginfo*-libs.rpm") +set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") + +set(EXPECTED_FILE_4 "debuginfo-applications-debuginfo*.rpm") +set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +set(EXPECTED_FILE_5 "debuginfo-libs-debuginfo*.rpm") +set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*") diff --git a/Tests/RunCMake/CPack/tests/DEB_EXTRA/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEB_EXTRA/ExpectedFiles.cmake new file mode 100644 index 0000000..4531a34 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEB_EXTRA/ExpectedFiles.cmake @@ -0,0 +1,9 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "3") +set(EXPECTED_FILE_1 "deb_extra-foo_0.1.1-1_*.deb") +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/CMakeLists.txt$") +set(EXPECTED_FILE_2 "deb_extra-bar_0.1.1-1_*.deb") +set(EXPECTED_FILE_CONTENT_2 "^.*/usr/${whitespaces_}.*/usr/bar/${whitespaces_}.*/usr/bar/CMakeLists.txt$") +set(EXPECTED_FILE_3 "deb_extra-bas_0.1.1-1_*.deb") +set(EXPECTED_FILE_CONTENT_3 "^.*/usr/${whitespaces_}.*/usr/bas/${whitespaces_}.*/usr/bas/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS/ExpectedFiles.cmake new file mode 100644 index 0000000..32a2327 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS/ExpectedFiles.cmake @@ -0,0 +1,6 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "deb_generate_shlibs_0.1.1-1_*.deb") +# dynamic lib extension is .so on Linux and .dylib on Mac so we will use a wildcard .* for it +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/libtest_lib\\..*$") diff --git a/Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS_LDCONFIG/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS_LDCONFIG/ExpectedFiles.cmake new file mode 100644 index 0000000..4966818 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEB_GENERATE_SHLIBS_LDCONFIG/ExpectedFiles.cmake @@ -0,0 +1,6 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "deb_generate_shlibs_ldconfig_0.1.1-1_*.deb") +# dynamic lib extension is .so on Linux and .dylib on Mac so we will use a wildcard .* for it +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/lib${whitespaces_}.*/usr/lib/libtest_lib\\..*$") diff --git a/Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake new file mode 100644 index 0000000..8459dd3 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake @@ -0,0 +1,28 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "5") + +if(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_1 "dependencies-0.1.1-*-applications.deb") + set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/test_prog$") + set(EXPECTED_FILE_2 "dependencies-0.1.1-*-applications_auto.deb") + set(EXPECTED_FILE_CONTENT_2 "^.*/usr/foo_auto${whitespaces_}.*/usr/foo_auto/test_prog$") + set(EXPECTED_FILE_3 "dependencies-0.1.1-*-headers.deb") + set(EXPECTED_FILE_CONTENT_3 "^.*/usr/bar${whitespaces_}.*/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_4 "dependencies-0.1.1-*-libs.deb") + # dynamic lib extension is .so on Linux and .dylib on Mac so we will use a wildcard .* for it + set(EXPECTED_FILE_CONTENT_4 "^.*/usr/bas${whitespaces_}.*/usr/bas/libtest_lib\\..*$") + set(EXPECTED_FILE_5 "dependencies-0.1.1-*-libs_auto.deb") + set(EXPECTED_FILE_CONTENT_5 "^.*/usr/bas_auto${whitespaces_}.*/usr/bas_auto/libtest_lib\\..*$") +elseif(GENERATOR_TYPE STREQUAL "RPM") + set(EXPECTED_FILE_1 "dependencies*-applications.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + set(EXPECTED_FILE_2 "dependencies*-applications_auto.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/foo_auto${whitespaces_}/usr/foo_auto/test_prog$") + set(EXPECTED_FILE_3 "dependencies*-headers.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_4 "dependencies*-libs.rpm") + set(EXPECTED_FILE_CONTENT_4 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") + set(EXPECTED_FILE_5 "dependencies*-libs_auto.rpm") + set(EXPECTED_FILE_CONTENT_5 "^/usr/bas_auto${whitespaces_}/usr/bas_auto/libtest_lib.so$") +endif() diff --git a/Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake new file mode 100644 index 0000000..5924f1f --- /dev/null +++ b/Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake @@ -0,0 +1,14 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") + +if(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_1 "empty_dir_0.1.1-1_*.deb") + set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$") +elseif(GENERATOR_TYPE STREQUAL "RPM") + set(EXPECTED_FILE_1 "empty_dir*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$") +elseif(GENERATOR_TYPE STREQUAL "TGZ") + set(EXPECTED_FILE_1 "empty_dir*.tar.gz") + set(EXPECTED_FILE_CONTENT_1 "^[^\n]*empty_dir-0.1.1-[^\n]*/empty/$") +endif() diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake new file mode 100644 index 0000000..033a45d --- /dev/null +++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake @@ -0,0 +1,7 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "2") +set(EXPECTED_FILE_1 "install_scripts*-foo.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") +set(EXPECTED_FILE_2 "install_scripts*-bar.rpm") +set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake new file mode 100644 index 0000000..dd72cf7 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "long_filenames_0.1.1-1_*.deb") +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt$") diff --git a/Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake new file mode 100644 index 0000000..69603dd --- /dev/null +++ b/Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake @@ -0,0 +1,13 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "0") + +if(NOT RunCMake_SUBTEST_SUFFIX STREQUAL "invalid") + set(EXPECTED_FILES_COUNT "3") + set(EXPECTED_FILE_1 "main_component-0.1.1-1.*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_2 "main_component*-headers.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_3 "main_component*-libs.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/CMakeLists.txt$") +endif() diff --git a/Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake new file mode 100644 index 0000000..546b891 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake @@ -0,0 +1,14 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") + +if(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_1 "minimal_0.1.1-1_*.deb") + set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/CMakeLists.txt$") +elseif(GENERATOR_TYPE STREQUAL "RPM") + set(EXPECTED_FILE_1 "minimal*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") +elseif(GENERATOR_TYPE STREQUAL "TGZ") + set(EXPECTED_FILE_1 "minimal*.tar.gz") + set(EXPECTED_FILE_CONTENT_1 "^[^\n]*minimal-0.1.1-[^\n]*/foo/\n[^\n]*minimal-0.1.1-[^\n]*/foo/CMakeLists.txt$") +endif() diff --git a/Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake new file mode 100644 index 0000000..205dcd8 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake @@ -0,0 +1,9 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "0") + +if (NOT ${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid") + set(EXPECTED_FILES_COUNT "1") + set(EXPECTED_FILE_1 "package_checksum*.tar.gz") + set(EXPECTED_FILE_CONTENT_1 "^[^\n]*package_checksum*-[^\n]*/foo/\n[^\n]*package_checksum-[^\n]*/foo/CMakeLists.txt$") +endif() diff --git a/Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake new file mode 100644 index 0000000..ddaa9db --- /dev/null +++ b/Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "partially_relocatable_warning-0.1.1-*.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/not_relocatable${whitespaces_}/not_relocatable/CMakeLists.txt${whitespaces_}/opt$") diff --git a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake new file mode 100644 index 0000000..8ff725c --- /dev/null +++ b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake @@ -0,0 +1,19 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "3") + +if(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_1 "per_component_fields-pkg_1_0.1.1-1_*.deb") + set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_2 "second_0.1.1-1_*.deb") + set(EXPECTED_FILE_CONTENT_2 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_3 "per_component_fields-pkg_3_0.1.1-1_*.deb") + set(EXPECTED_FILE_CONTENT_3 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") +elseif(GENERATOR_TYPE STREQUAL "RPM") + set(EXPECTED_FILE_1 "per_component_fields*-pkg_1.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_2 "per_component_fields*-pkg_2.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_3 "per_component_fields*-pkg_3.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") +endif() diff --git a/Tests/RunCMake/CPack/tests/RPM_DIST/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/RPM_DIST/ExpectedFiles.cmake new file mode 100644 index 0000000..3b5a347 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/RPM_DIST/ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "rpm_dist*.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/tests/RPM_SUGGESTS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/RPM_SUGGESTS/ExpectedFiles.cmake new file mode 100644 index 0000000..02ebb44 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/RPM_SUGGESTS/ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "rpm_suggests*.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake new file mode 100644 index 0000000..dc49343 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake @@ -0,0 +1,30 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "0") + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") + set(EXPECTED_FILES_COUNT "4") + set(EXPECTED_FILE_1 "single_debuginfo-0.1.1-1.*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + set(EXPECTED_FILE_2 "single_debuginfo*-headers.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_3 "single_debuginfo*-libs.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") + + set(EXPECTED_FILE_4 "single_debuginfo-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*") +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1 "single_debuginfo-0*-applications.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + + set(EXPECTED_FILE_2 "single_debuginfo-applications-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1 "single_debuginfo-0*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + + set(EXPECTED_FILE_2 "single_debuginfo-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +endif() diff --git a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake new file mode 100644 index 0000000..d6811eb --- /dev/null +++ b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "source_package*.src.rpm") +set(EXPECTED_FILE_CONTENT_1 "^source_package-0.1.1.tar.gz${whitespaces_}source_package.spec$") -- cgit v0.12