summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-04 12:34:10 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-04 12:37:04 (GMT)
commita7d2efc15b117e404aeaf952c762a96ba34787a3 (patch)
treecf93326b3d5b1f21a13b98513b5b4b1b70b20f43 /Tests/RunCMake
parent36140d864e71ee3d61240da42df2318b01cfbced (diff)
parent07a80c70020e0e533db8d75d7fe7c4270cc25afb (diff)
downloadCMake-a7d2efc15b117e404aeaf952c762a96ba34787a3.zip
CMake-a7d2efc15b117e404aeaf952c762a96ba34787a3.tar.gz
CMake-a7d2efc15b117e404aeaf952c762a96ba34787a3.tar.bz2
Merge topic 'remove_directories'
07a80c7002 cmake: Teach -E remove_directory to remove multiple directories 013bee698e Tests: Add RunCMake.CommandLine make_directory test checks 3eb16de327 Tests: Fix RunCMake.CommandLine make_directory test name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3411
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-check.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-three-directories-check.cmake6
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-two-directories-and-file-result.txt (renamed from Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-two-directories-and-file-stderr.txt (renamed from Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-check.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-stderr.txt0
-rw-r--r--Tests/RunCMake/CommandLine/E_remove_directory-three-directories-check.cmake6
-rw-r--r--Tests/RunCMake/CommandLine/E_remove_directory-three-directories-stderr.txt0
-rw-r--r--Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-check.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-stderr.txt0
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake8
11 files changed, 28 insertions, 1 deletions
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-check.cmake b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-check.cmake
new file mode 100644
index 0000000..ea3d161
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-check.cmake
@@ -0,0 +1,3 @@
+if(NOT IS_DIRECTORY ${out}/parent/child)
+ set(RunCMake_TEST_FAILED "child directory was not created")
+endif()
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-check.cmake b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-check.cmake
new file mode 100644
index 0000000..c1e8474
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-check.cmake
@@ -0,0 +1,6 @@
+if(NOT IS_DIRECTORY ${out}/d1)
+ set(RunCMake_TEST_FAILED "directory d1 was not created")
+endif()
+if(NOT IS_DIRECTORY ${out}/d2)
+ set(RunCMake_TEST_FAILED "directory d2 was not created")
+endif()
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-two-directories-and-file-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt
+++ b/Tests/RunCMake/CommandLine/E_make_directory-two-directories-and-file-result.txt
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-two-directories-and-file-stderr.txt
index 08a9428..08a9428 100644
--- a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt
+++ b/Tests/RunCMake/CommandLine/E_make_directory-two-directories-and-file-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-check.cmake b/Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-check.cmake
new file mode 100644
index 0000000..fd6ea11
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-check.cmake
@@ -0,0 +1,3 @@
+if(IS_DIRECTORY ${out}/parent/child)
+ set(RunCMake_TEST_FAILED "child directory was not removed")
+endif()
diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-stderr.txt b/Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-stderr.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_remove_directory-directory-with-parent-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-three-directories-check.cmake b/Tests/RunCMake/CommandLine/E_remove_directory-three-directories-check.cmake
new file mode 100644
index 0000000..2b7202a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_remove_directory-three-directories-check.cmake
@@ -0,0 +1,6 @@
+if(IS_DIRECTORY ${out}/d1)
+ set(RunCMake_TEST_FAILED "directory d1 was not removed")
+endif()
+if(IS_DIRECTORY ${out}/d2)
+ set(RunCMake_TEST_FAILED "directory d2 was not removed")
+endif()
diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-three-directories-stderr.txt b/Tests/RunCMake/CommandLine/E_remove_directory-three-directories-stderr.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_remove_directory-three-directories-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-check.cmake b/Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-check.cmake
new file mode 100644
index 0000000..0aa4a52
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-check.cmake
@@ -0,0 +1,3 @@
+if(NOT EXISTS ${outfile})
+ set(RunCMake_TEST_FAILED "removed non-directory ${outfile}")
+endif()
diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-stderr.txt b/Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-stderr.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_remove_directory-two-directories-and-file-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 7798b62..c9d3a4d 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -334,10 +334,16 @@ file(MAKE_DIRECTORY ${out})
file(WRITE ${outfile} "")
run_cmake_command(E_make_directory-three-directories
${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${out}/d2)
+run_cmake_command(E_remove_directory-three-directories
+ ${CMAKE_COMMAND} -E remove_directory ${out}/d1 ${out}/d2 ${out}/d2)
run_cmake_command(E_make_directory-directory-with-parent
${CMAKE_COMMAND} -E make_directory ${out}/parent/child)
-run_cmake_command(E_make_directory-three-directories-and-file
+run_cmake_command(E_remove_directory-directory-with-parent
+ ${CMAKE_COMMAND} -E remove_directory ${out}/parent)
+run_cmake_command(E_make_directory-two-directories-and-file
${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${outfile})
+run_cmake_command(E_remove_directory-two-directories-and-file
+ ${CMAKE_COMMAND} -E remove_directory ${out}/d1 ${out}/d2 ${outfile})
unset(out)
unset(outfile)