summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt9
-rw-r--r--Tests/RunCMake/CTestTimeout/Basic-stdout.txt2
-rw-r--r--Tests/RunCMake/CTestTimeout/Fork-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/ConfigCase-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt13
-rw-r--r--Tests/RunCMake/target_link_libraries/ConfigCase.cmake6
-rw-r--r--Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake8
10 files changed, 49 insertions, 11 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 450e7e5e0..c8850eaf2 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -100,6 +100,15 @@ ExternalProject_Add(${proj}
INSTALL_COMMAND ""
)
+set(proj NoExtractBool)
+ExternalProject_Add(${proj}
+ URL ${CMAKE_CURRENT_SOURCE_DIR}/gitrepo.tgz
+ DOWNLOAD_NO_EXTRACT 0
+ LOG_DOWNLOAD 1
+ BUILD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ INSTALL_COMMAND ""
+)
# CVS-based tests:
#
diff --git a/Tests/RunCMake/CTestTimeout/Basic-stdout.txt b/Tests/RunCMake/CTestTimeout/Basic-stdout.txt
index 30ed1782f..db59dbf0a 100644
--- a/Tests/RunCMake/CTestTimeout/Basic-stdout.txt
+++ b/Tests/RunCMake/CTestTimeout/Basic-stdout.txt
@@ -1,6 +1,6 @@
Test project [^
]*/Tests/RunCMake/CTestTimeout/Basic-build
Start 1: TestTimeout
-1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[0-9.]+ sec
+1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[1-9][0-9.]* sec
+
0% tests passed, 1 tests failed out of 1
diff --git a/Tests/RunCMake/CTestTimeout/Fork-stdout.txt b/Tests/RunCMake/CTestTimeout/Fork-stdout.txt
index 284e4b108..2938d8ee3 100644
--- a/Tests/RunCMake/CTestTimeout/Fork-stdout.txt
+++ b/Tests/RunCMake/CTestTimeout/Fork-stdout.txt
@@ -1,6 +1,6 @@
Test project [^
]*/Tests/RunCMake/CTestTimeout/Fork-build
Start 1: TestTimeout
-1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[0-9.]+ sec
+1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[1-9][0-9.]* sec
+
0% tests passed, 1 tests failed out of 1
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 087ef21f0..893072134 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -673,27 +673,26 @@ function(run_llvm_rc)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
run_cmake_command(llvm_rc_no_args ${CMAKE_COMMAND} -E cmake_llvm_rc)
- run_cmake_command(llvm_rc_no_-- ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E false -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E false )
+ run_cmake_command(llvm_rc_no_-- ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp -- ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -P FailedProgram.cmake -- ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -P FailedProgram.cmake )
if(EXISTS ${RunCMake_TEST_BINARY_DIR}/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
endif()
- run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E copy test.tmp llvmrc.result )
- if(EXISTS ${RunCMake_TEST_BINARY_DIR}/test.tmp)
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir")
+ run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E copy test.tmp SOURCE_DIR/llvmrc.result )
+ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
endif()
- file(READ ${RunCMake_TEST_BINARY_DIR}/llvmrc.result LLVMRC_RESULT)
+ file(READ ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/llvmrc.result LLVMRC_RESULT)
if(NOT "${LLVMRC_RESULT}" STREQUAL "This is a test\n")
message(SEND_ERROR "${test} - FAILED:\n"
"llvmrc.result was not created")
endif()
- # file(REMOVE ${RunCMake_TEST_BINARY_DIR}/llvmrc.result)
unset(LLVMRC_RESULT)
endfunction()
run_llvm_rc()
diff --git a/Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt b/Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt
new file mode 100644
index 000000000..765b70881
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt
@@ -0,0 +1 @@
+CMake Error
diff --git a/Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt b/Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt
new file mode 100644
index 000000000..765b70881
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt
@@ -0,0 +1 @@
+CMake Error
diff --git a/Tests/RunCMake/target_link_libraries/ConfigCase-result.txt b/Tests/RunCMake/target_link_libraries/ConfigCase-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/ConfigCase-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt b/Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt
new file mode 100644
index 000000000..953c9729e
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt
@@ -0,0 +1,13 @@
+^CMake Error at ConfigCase.cmake:[0-9]+ \(add_library\):
+ Target "impl" links to target "config::impl-Debug" but the target was not
+ found. Perhaps a find_package\(\) call is missing for an IMPORTED target, or
+ an ALIAS target is missing\?
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
++
+CMake Error at ConfigCase.cmake:[0-9]+ \(add_library\):
+ Target "impl" links to target "config::iface-Debug" but the target was not
+ found. Perhaps a find_package\(\) call is missing for an IMPORTED target, or
+ an ALIAS target is missing\?
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/target_link_libraries/ConfigCase.cmake b/Tests/RunCMake/target_link_libraries/ConfigCase.cmake
new file mode 100644
index 000000000..fc394781b
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/ConfigCase.cmake
@@ -0,0 +1,6 @@
+cmake_policy(VERSION 3.15)
+enable_language(C)
+add_library(iface INTERFACE)
+target_link_libraries(iface INTERFACE "config::iface-$<CONFIG>")
+add_library(impl empty.c)
+target_link_libraries(impl PRIVATE "config::impl-$<CONFIG>" iface)
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
index 0152d4c67..8eed98619 100644
--- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
@@ -1,5 +1,13 @@
include(RunCMake)
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)
+else()
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+endif()
+run_cmake(ConfigCase)
+unset(RunCMake_TEST_OPTIONS)
+
run_cmake(CMP0023-WARN)
run_cmake(CMP0023-NEW)
run_cmake(CMP0023-WARN-2)