diff options
Diffstat (limited to 'Tests')
18 files changed, 51 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stdout.txt new file mode 100644 index 0000000..be5d335 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-OFF.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-result.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stderr.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stdout.txt b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stdout.txt new file mode 100644 index 0000000..fa95148 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON-ctest-stdout.txt @@ -0,0 +1 @@ + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON.cmake new file mode 100644 index 0000000..e0368fc --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-TLSVerify-ON.cmake @@ -0,0 +1 @@ +include(FailDrop-common.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/FailDrop-common.cmake b/Tests/RunCMake/CTestCommandLine/FailDrop-common.cmake new file mode 100644 index 0000000..134d26d --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailDrop-common.cmake @@ -0,0 +1,3 @@ +set(SUBMIT_URL "https://badhostname.invalid") +set(CTEST_SUBMIT_RETRY_COUNT 0 CACHE STRING "") +include(CTest) diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 03aa690..c7f772c 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -1,6 +1,10 @@ include(RunCMake) include(RunCTest) +# Do not use any proxy for lookup of an invalid site. +# DNS failure by proxy looks different than DNS failure without proxy. +set(ENV{no_proxy} "$ENV{no_proxy},badhostname.invalid") + set(RunCMake_TEST_TIMEOUT 60) run_cmake_command(repeat-opt-bad1 @@ -484,6 +488,17 @@ run_NoTests() # Check the configuration type variable is passed run_ctest(check-configuration-type) +function(run_FailDrop case) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/FailDrop-${case}-build) + run_cmake_with_options(FailDrop-${case} ${ARGN}) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(FailDrop-${case}-ctest + ${CMAKE_CTEST_COMMAND} -M Experimental -T Submit -VV + ) +endfunction() +run_FailDrop(TLSVerify-ON -DCTEST_TLS_VERIFY=ON) +run_FailDrop(TLSVerify-OFF -DCTEST_TLS_VERIFY=OFF) + run_cmake_command(EmptyDirCoverage-ctest ${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Coverage ) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stdout.txt new file mode 100644 index 0000000..9053f6c --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-OFF-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfigurationFromCMakeVariable:TLSVerify:CTEST_TLS_VERIFY +SetCTestConfiguration:TLSVerify:OFF +.* + Set CURLOPT_SSL_VERIFYPEER to off diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stderr.txt new file mode 100644 index 0000000..e3df62f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stderr.txt @@ -0,0 +1,2 @@ +Error message was: ([Cc]ould *n.t resolve host:? '?badhostname.invalid'?|The requested URL returned error:|Protocol "https" (not supported or disabled|not supported|disabled)|.* was built with SSL disabled).* + Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stdout.txt new file mode 100644 index 0000000..c2764c3 --- /dev/null +++ b/Tests/RunCMake/ctest_submit/FailDrop-TLSVerify-ON-stdout.txt @@ -0,0 +1,4 @@ +SetCTestConfigurationFromCMakeVariable:TLSVerify:CTEST_TLS_VERIFY +SetCTestConfiguration:TLSVerify:ON +.* + Set CURLOPT_SSL_VERIFYPEER to on diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index ad35bf5..4d2d95b 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -4,6 +4,7 @@ include(RunCTest) set(CASE_DROP_METHOD "http") set(CASE_DROP_SITE "badhostname.invalid") set(CASE_CTEST_SUBMIT_ARGS "") +set(CASE_TEST_PREFIX_CODE "") # Do not use any proxy for lookup of an invalid site. # DNS failure by proxy looks different than DNS failure without proxy. @@ -54,3 +55,10 @@ endfunction() run_ctest_submit_FailDrop(http) run_ctest_submit_FailDrop(https) +block() + set(CASE_DROP_METHOD "https") + set(CASE_TEST_PREFIX_CODE "set(CTEST_TLS_VERIFY ON)") + run_ctest(FailDrop-TLSVerify-ON -VV) + set(CASE_TEST_PREFIX_CODE "set(CTEST_TLS_VERIFY OFF)") + run_ctest(FailDrop-TLSVerify-OFF -VV) +endblock() diff --git a/Tests/RunCMake/ctest_submit/test.cmake.in b/Tests/RunCMake/ctest_submit/test.cmake.in index 0f4885f..6026c35 100644 --- a/Tests/RunCMake/ctest_submit/test.cmake.in +++ b/Tests/RunCMake/ctest_submit/test.cmake.in @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.5) +@CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") |