summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/get_property
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-14 13:41:05 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-14 14:25:38 (GMT)
commite5ca59b456d3a1a51d0b5387ec9d04a51beaa0be (patch)
tree6166bc6a150f2a319c946e6395fc3636267e7bb6 /Tests/RunCMake/get_property
parent0699e0d3e4305fc4e615c36b831d0171c2f8c757 (diff)
downloadCMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.zip
CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.gz
CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.bz2
Tests: Move command failure cases into RunCMake infrastructure
Move failure cases from the CMake.{If,List,While,GetProperty} tests over to the RunCMake.{if,list,while,get_property} tests to use the more modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to try to regex-match full paths.
Diffstat (limited to 'Tests/RunCMake/get_property')
-rw-r--r--Tests/RunCMake/get_property/BadArgument-result.txt1
-rw-r--r--Tests/RunCMake/get_property/BadArgument-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/BadArgument.cmake1
-rw-r--r--Tests/RunCMake/get_property/BadDirectory-result.txt1
-rw-r--r--Tests/RunCMake/get_property/BadDirectory-stderr.txt6
-rw-r--r--Tests/RunCMake/get_property/BadDirectory.cmake1
-rw-r--r--Tests/RunCMake/get_property/BadScope-result.txt1
-rw-r--r--Tests/RunCMake/get_property/BadScope-stderr.txt5
-rw-r--r--Tests/RunCMake/get_property/BadScope.cmake1
-rw-r--r--Tests/RunCMake/get_property/BadTarget-result.txt1
-rw-r--r--Tests/RunCMake/get_property/BadTarget-stderr.txt5
-rw-r--r--Tests/RunCMake/get_property/BadTarget.cmake1
-rw-r--r--Tests/RunCMake/get_property/BadTest-result.txt1
-rw-r--r--Tests/RunCMake/get_property/BadTest-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/BadTest.cmake1
-rw-r--r--Tests/RunCMake/get_property/GlobalName-result.txt1
-rw-r--r--Tests/RunCMake/get_property/GlobalName-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/GlobalName.cmake1
-rw-r--r--Tests/RunCMake/get_property/MissingArgument-result.txt1
-rw-r--r--Tests/RunCMake/get_property/MissingArgument-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/MissingArgument.cmake1
-rw-r--r--Tests/RunCMake/get_property/NoCache-result.txt1
-rw-r--r--Tests/RunCMake/get_property/NoCache-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/NoCache.cmake1
-rw-r--r--Tests/RunCMake/get_property/NoProperty-result.txt1
-rw-r--r--Tests/RunCMake/get_property/NoProperty-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/NoProperty.cmake1
-rw-r--r--Tests/RunCMake/get_property/NoSource-result.txt1
-rw-r--r--Tests/RunCMake/get_property/NoSource-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/NoSource.cmake1
-rw-r--r--Tests/RunCMake/get_property/NoTarget-result.txt1
-rw-r--r--Tests/RunCMake/get_property/NoTarget-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/NoTarget.cmake1
-rw-r--r--Tests/RunCMake/get_property/NoTest-result.txt1
-rw-r--r--Tests/RunCMake/get_property/NoTest-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/NoTest.cmake1
-rw-r--r--Tests/RunCMake/get_property/RunCMakeTest.cmake14
-rw-r--r--Tests/RunCMake/get_property/VariableName-result.txt1
-rw-r--r--Tests/RunCMake/get_property/VariableName-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/VariableName.cmake1
40 files changed, 96 insertions, 0 deletions
diff --git a/Tests/RunCMake/get_property/BadArgument-result.txt b/Tests/RunCMake/get_property/BadArgument-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/BadArgument-stderr.txt b/Tests/RunCMake/get_property/BadArgument-stderr.txt
new file mode 100644
index 0000000..37c4477
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadArgument-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at BadArgument.cmake:1 \(get_property\):
+ get_property given invalid argument "FOO".
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/BadArgument.cmake b/Tests/RunCMake/get_property/BadArgument.cmake
new file mode 100644
index 0000000..382dabb
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadArgument.cmake
@@ -0,0 +1 @@
+get_property(FOO GLOBAL PROPERTY FOO FOO)
diff --git a/Tests/RunCMake/get_property/BadDirectory-result.txt b/Tests/RunCMake/get_property/BadDirectory-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadDirectory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/BadDirectory-stderr.txt b/Tests/RunCMake/get_property/BadDirectory-stderr.txt
new file mode 100644
index 0000000..98464f8
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadDirectory-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at BadDirectory.cmake:1 \(get_property\):
+ get_property DIRECTORY scope provided but requested directory was not
+ found. This could be because the directory argument was invalid or, it is
+ valid but has not been processed yet.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/BadDirectory.cmake b/Tests/RunCMake/get_property/BadDirectory.cmake
new file mode 100644
index 0000000..cdbfa80
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadDirectory.cmake
@@ -0,0 +1 @@
+get_property(FOO DIRECTORY NonExistentSubDir PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/BadScope-result.txt b/Tests/RunCMake/get_property/BadScope-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadScope-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/BadScope-stderr.txt b/Tests/RunCMake/get_property/BadScope-stderr.txt
new file mode 100644
index 0000000..4cc32c8
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadScope-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at BadScope.cmake:1 \(get_property\):
+ get_property given invalid scope FOO. Valid scopes are GLOBAL, DIRECTORY,
+ TARGET, SOURCE, TEST, VARIABLE, CACHE, INSTALL.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/BadScope.cmake b/Tests/RunCMake/get_property/BadScope.cmake
new file mode 100644
index 0000000..ea8566b
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadScope.cmake
@@ -0,0 +1 @@
+get_property(FOO FOO FOO)
diff --git a/Tests/RunCMake/get_property/BadTarget-result.txt b/Tests/RunCMake/get_property/BadTarget-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadTarget-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/BadTarget-stderr.txt b/Tests/RunCMake/get_property/BadTarget-stderr.txt
new file mode 100644
index 0000000..45a0df6
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadTarget-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at BadTarget.cmake:1 \(get_property\):
+ get_property could not find TARGET FOO. Perhaps it has not yet been
+ created.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/BadTarget.cmake b/Tests/RunCMake/get_property/BadTarget.cmake
new file mode 100644
index 0000000..9992dab
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadTarget.cmake
@@ -0,0 +1 @@
+get_property(FOO TARGET FOO PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/BadTest-result.txt b/Tests/RunCMake/get_property/BadTest-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadTest-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/BadTest-stderr.txt b/Tests/RunCMake/get_property/BadTest-stderr.txt
new file mode 100644
index 0000000..819c070
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadTest-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at BadTest.cmake:1 \(get_property\):
+ get_property given TEST name that does not exist: FOO
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/BadTest.cmake b/Tests/RunCMake/get_property/BadTest.cmake
new file mode 100644
index 0000000..44bf3eb
--- /dev/null
+++ b/Tests/RunCMake/get_property/BadTest.cmake
@@ -0,0 +1 @@
+get_property(FOO TEST FOO PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/GlobalName-result.txt b/Tests/RunCMake/get_property/GlobalName-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/GlobalName-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/GlobalName-stderr.txt b/Tests/RunCMake/get_property/GlobalName-stderr.txt
new file mode 100644
index 0000000..a7d4971
--- /dev/null
+++ b/Tests/RunCMake/get_property/GlobalName-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at GlobalName.cmake:1 \(get_property\):
+ get_property given name for GLOBAL scope.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/GlobalName.cmake b/Tests/RunCMake/get_property/GlobalName.cmake
new file mode 100644
index 0000000..497700c
--- /dev/null
+++ b/Tests/RunCMake/get_property/GlobalName.cmake
@@ -0,0 +1 @@
+get_property(FOO GLOBAL FOO PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/MissingArgument-result.txt b/Tests/RunCMake/get_property/MissingArgument-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/MissingArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/MissingArgument-stderr.txt b/Tests/RunCMake/get_property/MissingArgument-stderr.txt
new file mode 100644
index 0000000..8722712
--- /dev/null
+++ b/Tests/RunCMake/get_property/MissingArgument-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at MissingArgument.cmake:1 \(get_property\):
+ get_property called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/MissingArgument.cmake b/Tests/RunCMake/get_property/MissingArgument.cmake
new file mode 100644
index 0000000..f0d004d
--- /dev/null
+++ b/Tests/RunCMake/get_property/MissingArgument.cmake
@@ -0,0 +1 @@
+get_property()
diff --git a/Tests/RunCMake/get_property/NoCache-result.txt b/Tests/RunCMake/get_property/NoCache-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoCache-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/NoCache-stderr.txt b/Tests/RunCMake/get_property/NoCache-stderr.txt
new file mode 100644
index 0000000..defafb6
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoCache-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at NoCache.cmake:1 \(get_property\):
+ get_property not given name for CACHE scope.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/NoCache.cmake b/Tests/RunCMake/get_property/NoCache.cmake
new file mode 100644
index 0000000..9719fe7
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoCache.cmake
@@ -0,0 +1 @@
+get_property(FOO CACHE PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/NoProperty-result.txt b/Tests/RunCMake/get_property/NoProperty-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoProperty-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/NoProperty-stderr.txt b/Tests/RunCMake/get_property/NoProperty-stderr.txt
new file mode 100644
index 0000000..0ef147f
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoProperty-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at NoProperty.cmake:1 \(get_property\):
+ get_property not given a PROPERTY <name> argument.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/NoProperty.cmake b/Tests/RunCMake/get_property/NoProperty.cmake
new file mode 100644
index 0000000..bee230d
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoProperty.cmake
@@ -0,0 +1 @@
+get_property(FOO GLOBAL PROPERTY)
diff --git a/Tests/RunCMake/get_property/NoSource-result.txt b/Tests/RunCMake/get_property/NoSource-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoSource-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/NoSource-stderr.txt b/Tests/RunCMake/get_property/NoSource-stderr.txt
new file mode 100644
index 0000000..59fd0ad
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoSource-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at NoSource.cmake:1 \(get_property\):
+ get_property not given name for SOURCE scope.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/NoSource.cmake b/Tests/RunCMake/get_property/NoSource.cmake
new file mode 100644
index 0000000..89773c8
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoSource.cmake
@@ -0,0 +1 @@
+get_property(FOO SOURCE PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/NoTarget-result.txt b/Tests/RunCMake/get_property/NoTarget-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoTarget-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/NoTarget-stderr.txt b/Tests/RunCMake/get_property/NoTarget-stderr.txt
new file mode 100644
index 0000000..a0e1a94
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoTarget-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at NoTarget.cmake:1 \(get_property\):
+ get_property not given name for TARGET scope.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/NoTarget.cmake b/Tests/RunCMake/get_property/NoTarget.cmake
new file mode 100644
index 0000000..8f1fa23
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoTarget.cmake
@@ -0,0 +1 @@
+get_property(FOO TARGET PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/NoTest-result.txt b/Tests/RunCMake/get_property/NoTest-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoTest-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/NoTest-stderr.txt b/Tests/RunCMake/get_property/NoTest-stderr.txt
new file mode 100644
index 0000000..c90a0ffc
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoTest-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at NoTest.cmake:1 \(get_property\):
+ get_property not given name for TEST scope.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/NoTest.cmake b/Tests/RunCMake/get_property/NoTest.cmake
new file mode 100644
index 0000000..045bd56
--- /dev/null
+++ b/Tests/RunCMake/get_property/NoTest.cmake
@@ -0,0 +1 @@
+get_property(FOO TEST PROPERTY FOO)
diff --git a/Tests/RunCMake/get_property/RunCMakeTest.cmake b/Tests/RunCMake/get_property/RunCMakeTest.cmake
index e420b5b..00eef34 100644
--- a/Tests/RunCMake/get_property/RunCMakeTest.cmake
+++ b/Tests/RunCMake/get_property/RunCMakeTest.cmake
@@ -8,3 +8,17 @@ run_cmake(source_properties)
run_cmake(target_properties)
run_cmake(test_properties)
run_cmake(DebugConfigurations)
+
+run_cmake(MissingArgument)
+run_cmake(GlobalName)
+run_cmake(BadTest)
+run_cmake(BadTarget)
+run_cmake(BadScope)
+run_cmake(BadDirectory)
+run_cmake(BadArgument)
+run_cmake(VariableName)
+run_cmake(NoTest)
+run_cmake(NoTarget)
+run_cmake(NoSource)
+run_cmake(NoProperty)
+run_cmake(NoCache)
diff --git a/Tests/RunCMake/get_property/VariableName-result.txt b/Tests/RunCMake/get_property/VariableName-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/VariableName-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/VariableName-stderr.txt b/Tests/RunCMake/get_property/VariableName-stderr.txt
new file mode 100644
index 0000000..e9f3827
--- /dev/null
+++ b/Tests/RunCMake/get_property/VariableName-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at VariableName.cmake:1 \(get_property\):
+ get_property given name for VARIABLE scope.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/get_property/VariableName.cmake b/Tests/RunCMake/get_property/VariableName.cmake
new file mode 100644
index 0000000..9190f80
--- /dev/null
+++ b/Tests/RunCMake/get_property/VariableName.cmake
@@ -0,0 +1 @@
+get_property(FOO VARIABLE FOO PROPERTY FOO)