diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-11-26 19:37:07 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2016-11-27 22:20:35 (GMT) |
commit | 8575affa4c72e1c0d07f964d2f28eb6ddbadb291 (patch) | |
tree | c3a77601235a27d120bc983cbc56cdc493d7aa26 /Tests/RunCMake/CPack/tests/LONG_FILENAMES | |
parent | 79443e1b8b604de00d269e73a977f449bc3fcef2 (diff) | |
download | CMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.zip CMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.tar.gz CMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.tar.bz2 |
Tests: CPack test move and merge VerifyResult
Merge VerifyResult of different generators
pertest and move the file to its test dir.
Diffstat (limited to 'Tests/RunCMake/CPack/tests/LONG_FILENAMES')
-rw-r--r-- | Tests/RunCMake/CPack/tests/LONG_FILENAMES/VerifyResult.cmake | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/tests/LONG_FILENAMES/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/VerifyResult.cmake new file mode 100644 index 0000000..0452343 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/VerifyResult.cmake @@ -0,0 +1,26 @@ +# create structure required by non root dpkg install +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/updates") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "") + +# some programs used by fakeroot require sbin in path so we should not +# leave this to chance (programs: ldconfig and start-stop-daemon) +set(ENV{PATH} "$ENV{PATH}:/usr/local/sbin:/usr/sbin:/sbin") + +execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE} + -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir + --admindir=${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir + --log=${CMAKE_CURRENT_BINARY_DIR}/root_dir/dpkg.log + ${FOUND_FILE_1} + RESULT_VARIABLE install_result_ + ERROR_VARIABLE install_error_ + OUTPUT_QUIET + ) + +if(install_result_) + message(FATAL_ERROR "LONG_FILENAMES package error - result:" + " '${install_result_}'; text: '${install_error_}'") +endif() |