diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-02-26 23:36:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-27 13:45:57 (GMT) |
commit | 3db740cb31afd32548bdeec5f1c35c6cfb3c0693 (patch) | |
tree | 84596787f729b5579545929925c5a818c6cfe004 /Tests/CPackComponentsForAll | |
parent | 3cf86d9e7bb082b05c507c744b0a43981ba199c3 (diff) | |
download | CMake-3db740cb31afd32548bdeec5f1c35c6cfb3c0693.zip CMake-3db740cb31afd32548bdeec5f1c35c6cfb3c0693.tar.gz CMake-3db740cb31afd32548bdeec5f1c35c6cfb3c0693.tar.bz2 |
CPackRPM: Consolidate CPackComponentsForAll test case coverage
Use test infrastructure added by commit 1cbb1562 (Fix handling of
relocation prefix parent directories, 2015-02-26) to cover the same use
cases from tests added by commit 5857ca5e (CPackRPM: Drop explicit
handling of '@' symbols that breaks them, 2015-01-07) and drop the
latter.
Diffstat (limited to 'Tests/CPackComponentsForAll')
-rw-r--r-- | Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index 9b9ca0a..c7ec709 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -192,7 +192,11 @@ if(CPackGen MATCHES "RPM") set(spec_regex "*Unspecified*") set(check_content_list "^/usr/foo/bar /usr/foo/bar/bin -/usr/foo/bar/bin/mylibapp2$") +/usr/foo/bar/bin/@in@_@path@@with +/usr/foo/bar/bin/@in@_@path@@with/@and +/usr/foo/bar/bin/@in@_@path@@with/@and/@ +/usr/foo/bar/bin/@in@_@path@@with/@and/@/@in_path@ +/usr/foo/bar/bin/@in@_@path@@with/@and/@/@in_path@/mylibapp2$") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") endif() @@ -244,29 +248,5 @@ if(CPackGen MATCHES "RPM") message(FATAL_ERROR "error: '${check_file}' rpm package content does not match expected value - regex '${check_content_list}'; RPM output: '${check_package_content}'; generated spec file: '${spec_file_content}'") endif() endforeach() - - # test package content - foreach(check_file ${expected_file}) - string(REGEX MATCH ".*Unspecified.*" check_file_Unspecified_match ${check_file}) - - if(check_file_Unspecified_match) - execute_process(COMMAND ${RPM_EXECUTABLE} -pql ${check_file} - OUTPUT_VARIABLE check_file_content - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - - string(REGEX MATCH ".*bin/@in@_@path@@with/@and/@/@in_path@/mylibapp2$" check_at_in_path ${check_file_content}) - - if(NOT check_at_in_path) - file(GLOB_RECURSE spec_file "${CPackComponentsForAll_BINARY_DIR}/*Unspecified*.spec") - - if(spec_file) - file(READ ${spec_file} spec_file_content) - endif() - - message(FATAL_ERROR "error: '${check_file}' rpm package path with @ characters is missing or invalid. RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") - endif() - endif() - endforeach() endif() endif() |