diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-11-27 14:30:46 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2016-11-27 22:20:35 (GMT) |
commit | b687d2ba093b1b79e9faf09e45d11567b0ec9ac1 (patch) | |
tree | e71ea1d488d0e1130fa2f211bdabff0a322fc86b /Tests/RunCMake/CPack/DEB | |
parent | ed8858edb7c5100e1928c5a94f85485f0e322aa7 (diff) | |
download | CMake-b687d2ba093b1b79e9faf09e45d11567b0ec9ac1.zip CMake-b687d2ba093b1b79e9faf09e45d11567b0ec9ac1.tar.gz CMake-b687d2ba093b1b79e9faf09e45d11567b0ec9ac1.tar.bz2 |
Tests: CPack test use same content list
Content list for a certain test
should be the same between different
generators so whenever possible use
a single expected files list per
file for all generators.
Diffstat (limited to 'Tests/RunCMake/CPack/DEB')
-rw-r--r-- | Tests/RunCMake/CPack/DEB/Helpers.cmake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake index e5cda08..349b987 100644 --- a/Tests/RunCMake/CPack/DEB/Helpers.cmake +++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake @@ -29,6 +29,27 @@ function(getPackageNameGlobexpr NAME COMPONENT VERSION REVISION FILE_NO RESULT_V endif() endfunction() +function(getPackageContentList FILE RESULT_VAR) + execute_process(COMMAND ${DPKG_EXECUTABLE} -c "${FILE}" + OUTPUT_VARIABLE package_content_ + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + unset(items_) + string(REPLACE "\n" ";" package_content_ "${package_content_}") + foreach(i_ IN LISTS package_content_) + string(REGEX REPLACE "^.* \.(/[^$]*)$" "\\1" result_ "${i_}") + string(REGEX REPLACE "/$" "" result_ "${result_}") + list(APPEND items_ "${result_}") + endforeach() + + set(${RESULT_VAR} "${items_}" PARENT_SCOPE) +endfunction() + +function(toExpectedContentList FILE_NO CONTENT_VAR) + # no need to do anything +endfunction() + function(getMissingShlibsErrorExtra FILE RESULT_VAR) execute_process(COMMAND ${DPKG_EXECUTABLE} -x "${FILE}" data_${PREFIX} ERROR_VARIABLE err_) |