diff options
Diffstat (limited to 'Tests/RunCMake/file-CHMOD')
41 files changed, 71 insertions, 79 deletions
diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-stderr.txt deleted file mode 100644 index b22387b..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -CMake Error at CHMOD-all-perms\.cmake:[0-9]+ \(file\): - file Remove either PERMISSIONS or FILE_PERMISSIONS or DIRECTORY_PERMISSIONS - from the invocation -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-all-perms.cmake deleted file mode 100644 index b49583d..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms.cmake +++ /dev/null @@ -1,6 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a) -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_READ - FILE_PERMISSIONS OWNER_READ DIRECTORY_PERMISSIONS OWNER_READ) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-stderr.txt deleted file mode 100644 index 8d09e35..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Error at CHMOD-invalid-path\.cmake:[0-9]+ \(file\): - file does not exist: - - .*/chmod-tests/I_dont_exist -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path.cmake deleted file mode 100644 index 36915c1..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path.cmake +++ /dev/null @@ -1,4 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/I_dont_exist PERMISSIONS OWNER_READ) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-stderr.txt deleted file mode 100644 index 84ba2a2..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Error at CHMOD-invalid-perms\.cmake:[0-9]+ \(file\): - file INVALID_PERMISSION is an invalid permission specifier -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms.cmake deleted file mode 100644 index 22cab0b..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms.cmake +++ /dev/null @@ -1,5 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a) -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS INVALID_PERMISSION) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-stderr.txt deleted file mode 100644 index 2c248f8..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Error at CHMOD-no-keyword\.cmake:[0-9]+ \(file\): - file No permissions given -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword.cmake deleted file mode 100644 index 8b62106..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword.cmake +++ /dev/null @@ -1,5 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a) -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-stderr.txt deleted file mode 100644 index a18609f..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Error at CHMOD-no-perms\.cmake:[0-9]+ \(file\): - file No permissions given -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-no-perms.cmake deleted file mode 100644 index 9fbd359..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms.cmake +++ /dev/null @@ -1,5 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a) -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-ok.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-ok.cmake deleted file mode 100644 index 87e3e57..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-ok.cmake +++ /dev/null @@ -1,5 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a) -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_READ) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-override.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-override.cmake deleted file mode 100644 index d9226b8..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-override.cmake +++ /dev/null @@ -1,6 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a) -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_READ - FILE_PERMISSIONS OWNER_READ OWNER_WRITE) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-write-only-stderr.txt b/Tests/RunCMake/file-CHMOD/CHMOD-write-only-stderr.txt deleted file mode 100644 index 1c87a59..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-write-only-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -CMake Error at CHMOD-write-only\.cmake:[0-9]+ \(file\): - file failed to open for reading \(Permission denied\): - - .*/chmod-tests/a -Call Stack \(most recent call first\): - CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-write-only.cmake b/Tests/RunCMake/file-CHMOD/CHMOD-write-only.cmake deleted file mode 100644 index 1289efc..0000000 --- a/Tests/RunCMake/file-CHMOD/CHMOD-write-only.cmake +++ /dev/null @@ -1,6 +0,0 @@ -file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests) - -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a "CONTENT") -file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a PERMISSIONS OWNER_WRITE) -file(READ ${CMAKE_CURRENT_BINARY_DIR}/chmod-tests/a content) diff --git a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake index 18deb89..e6b1169 100644 --- a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake +++ b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake @@ -1,12 +1,14 @@ include(RunCMake) -run_cmake(CHMOD-no-perms) -run_cmake(CHMOD-no-keyword) -run_cmake(CHMOD-all-perms) -run_cmake(CHMOD-invalid-perms) -run_cmake(CHMOD-invalid-path) -run_cmake(CHMOD-ok) -run_cmake(CHMOD-override) +run_cmake_script(no-perms) +run_cmake_script(missing-perms) +run_cmake_script(missing-file-perms) +run_cmake_script(missing-dir-perms) +run_cmake_script(all-perms) +run_cmake_script(invalid-perms) +run_cmake_script(invalid-path) +run_cmake_script(ok) +run_cmake_script(override) if(UNIX) execute_process(COMMAND id -u $ENV{USER} @@ -15,5 +17,5 @@ if(UNIX) endif() if(NOT WIN32 AND NOT MSYS AND NOT "${uid}" STREQUAL "0") - run_cmake(CHMOD-write-only) + run_cmake_script(write-only) endif() diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-write-only-result.txt b/Tests/RunCMake/file-CHMOD/all-perms-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/file-CHMOD/CHMOD-write-only-result.txt +++ b/Tests/RunCMake/file-CHMOD/all-perms-result.txt diff --git a/Tests/RunCMake/file-CHMOD/all-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/all-perms-stderr.txt new file mode 100644 index 0000000..6932a1f --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/all-perms-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at [^ +]*/all-perms\.cmake:[0-9]+ \(file\): + file Remove either PERMISSIONS or FILE_PERMISSIONS or DIRECTORY_PERMISSIONS + from the invocation$ diff --git a/Tests/RunCMake/file-CHMOD/all-perms.cmake b/Tests/RunCMake/file-CHMOD/all-perms.cmake new file mode 100644 index 0000000..5ff81b8 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/all-perms.cmake @@ -0,0 +1,3 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_READ + FILE_PERMISSIONS OWNER_READ DIRECTORY_PERMISSIONS OWNER_READ) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-result.txt b/Tests/RunCMake/file-CHMOD/invalid-path-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/file-CHMOD/CHMOD-no-perms-result.txt +++ b/Tests/RunCMake/file-CHMOD/invalid-path-result.txt diff --git a/Tests/RunCMake/file-CHMOD/invalid-path-stderr.txt b/Tests/RunCMake/file-CHMOD/invalid-path-stderr.txt new file mode 100644 index 0000000..eb5fb31 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/invalid-path-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at [^ +]*/invalid-path\.cmake:[0-9]+ \(file\): + file does not exist: + + [^ +]*/Tests/RunCMake/file-CHMOD/invalid-path-build/I_dont_exist$ diff --git a/Tests/RunCMake/file-CHMOD/invalid-path.cmake b/Tests/RunCMake/file-CHMOD/invalid-path.cmake new file mode 100644 index 0000000..e8b0313 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/invalid-path.cmake @@ -0,0 +1 @@ +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/I_dont_exist PERMISSIONS OWNER_READ) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-result.txt b/Tests/RunCMake/file-CHMOD/invalid-perms-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/file-CHMOD/CHMOD-no-keyword-result.txt +++ b/Tests/RunCMake/file-CHMOD/invalid-perms-result.txt diff --git a/Tests/RunCMake/file-CHMOD/invalid-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/invalid-perms-stderr.txt new file mode 100644 index 0000000..daab22e --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/invalid-perms-stderr.txt @@ -0,0 +1,3 @@ +^CMake Error at [^ +]*/invalid-perms\.cmake:[0-9]+ \(file\): + file INVALID_PERMISSION is an invalid permission specifier$ diff --git a/Tests/RunCMake/file-CHMOD/invalid-perms.cmake b/Tests/RunCMake/file-CHMOD/invalid-perms.cmake new file mode 100644 index 0000000..42129b9 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/invalid-perms.cmake @@ -0,0 +1,2 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS INVALID_PERMISSION) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-result.txt b/Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-perms-result.txt +++ b/Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt diff --git a/Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt new file mode 100644 index 0000000..c05bb2d --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at [^ +]*/missing-dir-perms.cmake:[0-9]+ \(file\): + Error after keyword "DIRECTORY_PERMISSIONS": + + missing required value$ diff --git a/Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake b/Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake new file mode 100644 index 0000000..9d0fdad --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake @@ -0,0 +1,2 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_READ DIRECTORY_PERMISSIONS) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-result.txt b/Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/file-CHMOD/CHMOD-invalid-path-result.txt +++ b/Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt diff --git a/Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt new file mode 100644 index 0000000..c3f4f0f --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at [^ +]*/missing-file-perms.cmake:[0-9]+ \(file\): + Error after keyword "FILE_PERMISSIONS": + + missing required value$ diff --git a/Tests/RunCMake/file-CHMOD/missing-file-perms.cmake b/Tests/RunCMake/file-CHMOD/missing-file-perms.cmake new file mode 100644 index 0000000..bcf35aa --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/missing-file-perms.cmake @@ -0,0 +1,2 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_READ FILE_PERMISSIONS) diff --git a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-result.txt b/Tests/RunCMake/file-CHMOD/missing-perms-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/file-CHMOD/CHMOD-all-perms-result.txt +++ b/Tests/RunCMake/file-CHMOD/missing-perms-result.txt diff --git a/Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt new file mode 100644 index 0000000..1508b13 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at [^ +]*/missing-perms.cmake:[0-9]+ \(file\): + Error after keyword "PERMISSIONS": + + missing required value$ diff --git a/Tests/RunCMake/file-CHMOD/missing-perms.cmake b/Tests/RunCMake/file-CHMOD/missing-perms.cmake new file mode 100644 index 0000000..da9f182 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/missing-perms.cmake @@ -0,0 +1,2 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a FILE_PERMISSIONS OWNER_READ PERMISSIONS) diff --git a/Tests/RunCMake/file-CHMOD/no-perms-result.txt b/Tests/RunCMake/file-CHMOD/no-perms-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/no-perms-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file-CHMOD/no-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/no-perms-stderr.txt new file mode 100644 index 0000000..4c5a139 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/no-perms-stderr.txt @@ -0,0 +1,3 @@ +^CMake Error at [^ +]*/no-perms\.cmake:[0-9]+ \(file\): + file No permissions given$ diff --git a/Tests/RunCMake/file-CHMOD/no-perms.cmake b/Tests/RunCMake/file-CHMOD/no-perms.cmake new file mode 100644 index 0000000..602cfc2 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/no-perms.cmake @@ -0,0 +1,2 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a) diff --git a/Tests/RunCMake/file-CHMOD/ok.cmake b/Tests/RunCMake/file-CHMOD/ok.cmake new file mode 100644 index 0000000..7c74d27 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/ok.cmake @@ -0,0 +1,2 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_READ) diff --git a/Tests/RunCMake/file-CHMOD/override.cmake b/Tests/RunCMake/file-CHMOD/override.cmake new file mode 100644 index 0000000..67e5a23 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/override.cmake @@ -0,0 +1,3 @@ +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a) +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_READ + FILE_PERMISSIONS OWNER_READ OWNER_WRITE) diff --git a/Tests/RunCMake/file-CHMOD/write-only-result.txt b/Tests/RunCMake/file-CHMOD/write-only-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/write-only-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file-CHMOD/write-only-stderr.txt b/Tests/RunCMake/file-CHMOD/write-only-stderr.txt new file mode 100644 index 0000000..169a092 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/write-only-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at [^ +]*/write-only\.cmake:[0-9]+ \(file\): + file failed to open for reading \(Permission denied\): + + [^ +]*/Tests/RunCMake/file-CHMOD/write-only-build/a$ diff --git a/Tests/RunCMake/file-CHMOD/write-only.cmake b/Tests/RunCMake/file-CHMOD/write-only.cmake new file mode 100644 index 0000000..aa9d803 --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/write-only.cmake @@ -0,0 +1,3 @@ +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/a "CONTENT") +file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_WRITE) +file(READ ${CMAKE_CURRENT_BINARY_DIR}/a content) |