summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt3
-rw-r--r--Tests/CompileFeatures/feature_test.c10
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt2
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main.cpp4
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp4
-rw-r--r--Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt4
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt2
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt2
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake8
25 files changed, 64 insertions, 3 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 5cd0836..ef37dcb 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -103,8 +103,9 @@ foreach(lang CXX C)
try_compile(${feature}_works
"${CMAKE_CURRENT_BINARY_DIR}/${feature}_test"
"${CMAKE_CURRENT_SOURCE_DIR}/feature_test.${${lang}_ext}"
- COMPILE_DEFINITIONS "-DTEST=${CMAKE_CURRENT_SOURCE_DIR}/${feature}.${${lang}_ext}"
+ COMPILE_DEFINITIONS "-DTEST=${feature}.${${lang}_ext}"
CMAKE_FLAGS "-DCMAKE_${lang}_STANDARD=${${lang}_standard_flag}"
+ "-DINCLUDE_DIRECTORIES=${CMAKE_CURRENT_SOURCE_DIR}"
OUTPUT_VARIABLE OUTPUT
)
if (${feature}_works)
diff --git a/Tests/CompileFeatures/feature_test.c b/Tests/CompileFeatures/feature_test.c
new file mode 100644
index 0000000..4147f1f
--- /dev/null
+++ b/Tests/CompileFeatures/feature_test.c
@@ -0,0 +1,10 @@
+
+#define STRINGIFY_IMPL(X) #X
+#define STRINGIFY(X) STRINGIFY_IMPL(X)
+
+#include STRINGIFY(TEST)
+
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index b5e46c0..78c4a6a 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -71,7 +71,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
add_executable(C_undefined c_undefined.c)
- set_property(TARGET C_undefined PROPERTY CXX_STANDARD 90)
+ set_property(TARGET C_undefined PROPERTY C_STANDARD 90)
target_compile_options(C_undefined PRIVATE -Werror=undef)
endif()
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.cpp b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
index 82b2191..192094c 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
@@ -4,6 +4,10 @@
#define PREFIX TEST
#include "compile_tests.h"
+#ifdef TEST_COMPILER_C_STATIC_ASSERT
+#error Expect no C features defined
+#endif
+
int main()
{
return 0;
diff --git a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
index ca29823..1635091 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
@@ -4,6 +4,10 @@
#define PREFIX MULTI
#include "compile_tests.h"
+#ifdef MULTI_COMPILER_C_STATIC_ASSERT
+#error Expect no C features defined
+#endif
+
int main()
{
return 0;
diff --git a/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in b/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in
index f0e1653..378a85a 100644
--- a/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in
+++ b/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in
@@ -3,3 +3,4 @@ set(CTEST_PROJECT_NAME "CTestSubmit@CASE_NAME@")
# Intentionally leave out other upload-related CTestConfig.cmake settings
# so that any ctest_submit calls fail with an error message.
set(CTEST_DROP_METHOD "@CASE_DROP_METHOD@")
+set(CTEST_DROP_SITE "@CASE_DROP_SITE@")
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt
new file mode 100644
index 0000000..b451315
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt
@@ -0,0 +1,4 @@
+Missing arguments for submit via cp:
+.*
+ Problems when submitting via CP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-cp/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt
new file mode 100644
index 0000000..fa6e004
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt
@@ -0,0 +1 @@
+Submit files \(using cp\)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt
new file mode 100644
index 0000000..a622fac
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt
@@ -0,0 +1,3 @@
+Error message was: .*
+ Problems when submitting via FTP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-ftp/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt
new file mode 100644
index 0000000..345bb62
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt
@@ -0,0 +1,3 @@
+Submit files \(using ftp\)
+ Using FTP submit method
+ Drop site: ftp://
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt
new file mode 100644
index 0000000..6870d2e
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt
@@ -0,0 +1,3 @@
+Error message was: .*
+ Problems when submitting via HTTP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-http/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt
new file mode 100644
index 0000000..c7f35c5
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt
@@ -0,0 +1,3 @@
+Submit files \(using http\)
+ Using HTTP submit method
+ Drop site:http://
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt
new file mode 100644
index 0000000..a3c0cd5
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt
@@ -0,0 +1,3 @@
+Error message was: .*
+ Problems when submitting via HTTP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-https/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt
new file mode 100644
index 0000000..19f8234
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt
@@ -0,0 +1,3 @@
+Submit files \(using https\)
+ Using HTTP submit method
+ Drop site:https://
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt
new file mode 100644
index 0000000..42b8f50
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt
@@ -0,0 +1,2 @@
+ Problems when submitting via SCP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-scp/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt
new file mode 100644
index 0000000..ec2ce92
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt
@@ -0,0 +1 @@
+Submit files \(using scp\)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt
new file mode 100644
index 0000000..020b615
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt
@@ -0,0 +1,2 @@
+ (Problems when submitting via XML-RPC|Submission method "xmlrpc" not compiled into CTest!)
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt
new file mode 100644
index 0000000..ed2acb5
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt
@@ -0,0 +1 @@
+Submit files \(using xmlrpc\)
diff --git a/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake b/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake
index bfb3b96..797365d 100644
--- a/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake
@@ -2,6 +2,7 @@ include(RunCMake)
# Default case parameters.
set(CASE_DROP_METHOD "http")
+set(CASE_DROP_SITE "-no-site-")
set(CASE_CTEST_SUBMIT_ARGS "")
function(run_ctest CASE_NAME)
@@ -53,4 +54,9 @@ function(run_ctest_submit_FailDrop CASE_DROP_METHOD)
run_ctest(FailDrop-${CASE_DROP_METHOD})
endfunction()
-# TODO: call run_ctest_submit_FailDrop() for each submission protocol
+run_ctest_submit_FailDrop(cp)
+run_ctest_submit_FailDrop(ftp)
+run_ctest_submit_FailDrop(http)
+run_ctest_submit_FailDrop(https)
+run_ctest_submit_FailDrop(scp)
+run_ctest_submit_FailDrop(xmlrpc)