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.
This commit is contained in:
Domen Vrankar 2015-06-05 21:12:08 +02:00 committed by Brad King
parent e726fc025a
commit 5f61ed991b
7 changed files with 6 additions and 28 deletions

View File

@ -239,10 +239,6 @@ add_RunCMake_test(IfacePaths_INCLUDE_DIRECTORIES TEST_DIR IfacePaths)
set(IfacePaths_SOURCES_ARGS -DTEST_PROP=SOURCES) set(IfacePaths_SOURCES_ARGS -DTEST_PROP=SOURCES)
add_RunCMake_test(IfacePaths_SOURCES TEST_DIR IfacePaths) add_RunCMake_test(IfacePaths_SOURCES TEST_DIR IfacePaths)
if(RPMBUILD_EXECUTABLE)
add_RunCMake_test(CPackRPM)
endif()
add_RunCMake_test(COMPILE_LANGUAGE-genex) add_RunCMake_test(COMPILE_LANGUAGE-genex)
# Matlab module related tests # Matlab module related tests

View File

@ -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$")

View File

@ -5,3 +5,4 @@ include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
# args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP # args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP
run_cpack_test(MINIMAL "RPM;DEB" false) run_cpack_test(MINIMAL "RPM;DEB" false)
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false)

View File

@ -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)

View File

@ -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)