diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-06-05 19:12:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-15 19:09:07 (GMT) |
commit | 5f61ed991b3b6b9f61edc97a10b257d3343c7302 (patch) | |
tree | 42a19c465b529b7ba6b37d3940704fa4f6f84eea /Tests/RunCMake | |
parent | e726fc025a3543c0be8a4eb217b0a80f9c16051c (diff) | |
download | CMake-5f61ed991b3b6b9f61edc97a10b257d3343c7302.zip CMake-5f61ed991b3b6b9f61edc97a10b257d3343c7302.tar.gz CMake-5f61ed991b3b6b9f61edc97a10b257d3343c7302.tar.bz2 |
Tests: Move RunCMake.CPackRPM case into RunCMake.CPack_RPM test
Move PARTIALLY_RELOCATABLE_WARNING test to the new common CPack test
script structure to have all tests in one place as well as additional
benefit of having some more checks done during test execution.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/PARTIALLY_RELOCATABLE_WARNING.cmake (renamed from Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-stderr.txt (renamed from Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING-stderr.txt) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CPackRPM/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CPackRPM/RunCMakeTest.cmake | 17 |
7 files changed, 6 insertions, 28 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index f4abed2..74bbf38 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -239,10 +239,6 @@ add_RunCMake_test(IfacePaths_INCLUDE_DIRECTORIES TEST_DIR IfacePaths) set(IfacePaths_SOURCES_ARGS -DTEST_PROP=SOURCES) add_RunCMake_test(IfacePaths_SOURCES TEST_DIR IfacePaths) -if(RPMBUILD_EXECUTABLE) - add_RunCMake_test(CPackRPM) -endif() - add_RunCMake_test(COMPILE_LANGUAGE-genex) # Matlab module related tests diff --git a/Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake b/Tests/RunCMake/CPack/PARTIALLY_RELOCATABLE_WARNING.cmake index 31e729b..31e729b 100644 --- a/Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake +++ b/Tests/RunCMake/CPack/PARTIALLY_RELOCATABLE_WARNING.cmake diff --git a/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake new file mode 100644 index 0000000..4e01f7b --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/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/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING-stderr.txt b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-stderr.txt index 3b63d5b..3b63d5b 100644 --- a/Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING-stderr.txt +++ b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-stderr.txt diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 426734e..308b8cc 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -5,3 +5,4 @@ include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") # args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP run_cpack_test(MINIMAL "RPM;DEB" false) +run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false) diff --git a/Tests/RunCMake/CPackRPM/CMakeLists.txt b/Tests/RunCMake/CPackRPM/CMakeLists.txt deleted file mode 100644 index b7d170b..0000000 --- a/Tests/RunCMake/CPackRPM/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) - -project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake) - -set(CPACK_GENERATOR "RPM") -include(CPack) diff --git a/Tests/RunCMake/CPackRPM/RunCMakeTest.cmake b/Tests/RunCMake/CPackRPM/RunCMakeTest.cmake deleted file mode 100644 index 1935e32..0000000 --- a/Tests/RunCMake/CPackRPM/RunCMakeTest.cmake +++ /dev/null @@ -1,17 +0,0 @@ -include(RunCMake) - -function(run_cpack_rpm_test TEST_NAME) - set(RunCMake_TEST_NO_CLEAN TRUE) - set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build") - file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") - file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") - execute_process( - COMMAND "${CMAKE_COMMAND}" -D RunCMake_TEST=${TEST_NAME} "${RunCMake_SOURCE_DIR}" - WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}" - OUTPUT_QUIET - ERROR_QUIET - ) - run_cmake_command(${TEST_NAME} ${CMAKE_CPACK_COMMAND}) -endfunction() - -run_cpack_rpm_test(CPackRPM_PARTIALLY_RELOCATABLE_WARNING) |