summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
blob: 12635dbfb0a4def35b9dd2fb2da1632535e6e795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
include(RunCMake)

function(external_command_test NAME)
  run_cmake_command(${NAME} ${CMAKE_COMMAND} -E ${ARGN})
endfunction()

external_command_test(bad-opt1   tar cvf bad.tar --bad)
external_command_test(bad-mtime1 tar cvf bad.tar --mtime=bad .)
external_command_test(bad-from1  tar cvf bad.tar --files-from=bad)
external_command_test(bad-from2  tar cvf bad.tar --files-from=.)
external_command_test(bad-from3  tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/bad-from3.txt)
external_command_test(bad-from4  tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/bad-from4.txt)
external_command_test(bad-from5  tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/bad-from5.txt)
external_command_test(end-opt1   tar cvf bad.tar -- --bad)
external_command_test(end-opt2   tar cvf bad.tar --)
external_command_test(mtime      tar cvf bad.tar "--mtime=1970-01-01 00:00:00 UTC")
external_command_test(bad-format tar cvf bad.tar "--format=bad-format")
external_command_test(zip-bz2    tar cvjf bad.tar "--format=zip")
external_command_test(7zip-gz    tar cvzf bad.tar "--format=7zip")

run_cmake(7zip)
run_cmake(gnutar)
run_cmake(gnutar-gz)
run_cmake(pax)
run_cmake(pax-xz)
run_cmake(paxr)
run_cmake(paxr-bz2)
run_cmake(zip)