summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-16 19:41:19 (GMT)
committerBrad King <brad.king@kitware.com>2023-01-18 22:59:10 (GMT)
commitf6ed2585e595305d4866e4128bf98e9236b6ecd2 (patch)
treee8d924affc5a2e563038719cc0e20b15ee958fd0 /Tests
parent0f688386eabafb1e70a172004df8be4d9dc1d037 (diff)
downloadCMake-f6ed2585e595305d4866e4128bf98e9236b6ecd2.zip
CMake-f6ed2585e595305d4866e4128bf98e9236b6ecd2.tar.gz
CMake-f6ed2585e595305d4866e4128bf98e9236b6ecd2.tar.bz2
Modules: Record system inspection steps in the configure log
Replace old-style `file(APPEND .../CMake{Output,Error}.log)` logging with calls to `message(CONFIGURE_LOG)` to record the steps in the `CMakeConfigureLog.yaml` configure log instead. Issue: #23200
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/Configure/ErrorLogs-stderr.txt4
-rw-r--r--Tests/RunCMake/Configure/ErrorLogs.cmake2
-rw-r--r--Tests/RunCMake/try_compile/ConfigureLog-config.txt18
-rw-r--r--Tests/RunCMake/try_compile/Inspect-config.txt27
-rw-r--r--Tests/RunCMake/try_compile/SourceFromBadName-config.txt12
-rw-r--r--Tests/RunCMake/try_run/ConfigureLog-config.txt18
6 files changed, 71 insertions, 10 deletions
diff --git a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt b/Tests/RunCMake/Configure/ErrorLogs-stderr.txt
index 4eee45d..ec8c8c2 100644
--- a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt
+++ b/Tests/RunCMake/Configure/ErrorLogs-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at ErrorLogs.cmake:3 \(message\):
+CMake Error at ErrorLogs.cmake:[0-9]+ \(message\):
Some error!
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/Configure/ErrorLogs.cmake b/Tests/RunCMake/Configure/ErrorLogs.cmake
index e8cf062..3a9d107 100644
--- a/Tests/RunCMake/Configure/ErrorLogs.cmake
+++ b/Tests/RunCMake/Configure/ErrorLogs.cmake
@@ -1,3 +1,5 @@
+file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Some detailed output information!\n")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Some detailed error information!\n")
message(SEND_ERROR "Some error!")
diff --git a/Tests/RunCMake/try_compile/ConfigureLog-config.txt b/Tests/RunCMake/try_compile/ConfigureLog-config.txt
index 262ed3c..1f848bf 100644
--- a/Tests/RunCMake/try_compile/ConfigureLog-config.txt
+++ b/Tests/RunCMake/try_compile/ConfigureLog-config.txt
@@ -1,6 +1,13 @@
^
---
-events:
+events:(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)+
-
kind: "try_compile-v1"
backtrace:
@@ -17,7 +24,14 @@ events:
variable: "CMAKE_C_ABI_COMPILED"
cached: true
stdout: \|.*
- exitCode: 0
+ exitCode: 0(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)*
-
kind: "try_compile-v1"
backtrace:
diff --git a/Tests/RunCMake/try_compile/Inspect-config.txt b/Tests/RunCMake/try_compile/Inspect-config.txt
index e09fe55..7a39335 100644
--- a/Tests/RunCMake/try_compile/Inspect-config.txt
+++ b/Tests/RunCMake/try_compile/Inspect-config.txt
@@ -1,6 +1,13 @@
^
---
-events:
+events:(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)+
-
kind: "try_compile-v1"
backtrace:
@@ -17,7 +24,14 @@ events:
variable: "CMAKE_C_ABI_COMPILED"
cached: true
stdout: \|.*
- exitCode: 0
+ exitCode: 0(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)+
-
kind: "try_compile-v1"
backtrace:
@@ -34,5 +48,12 @@ events:
variable: "CMAKE_CXX_ABI_COMPILED"
cached: true
stdout: \|.*
- exitCode: 0
+ exitCode: 0(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)*
\.\.\.$
diff --git a/Tests/RunCMake/try_compile/SourceFromBadName-config.txt b/Tests/RunCMake/try_compile/SourceFromBadName-config.txt
index 10f3293..cb76565 100644
--- a/Tests/RunCMake/try_compile/SourceFromBadName-config.txt
+++ b/Tests/RunCMake/try_compile/SourceFromBadName-config.txt
@@ -1 +1,11 @@
-^$
+^
+---
+events:(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)+
+\.\.\.$
diff --git a/Tests/RunCMake/try_run/ConfigureLog-config.txt b/Tests/RunCMake/try_run/ConfigureLog-config.txt
index ba396e0..bf3c3bd 100644
--- a/Tests/RunCMake/try_run/ConfigureLog-config.txt
+++ b/Tests/RunCMake/try_run/ConfigureLog-config.txt
@@ -1,6 +1,13 @@
^
---
-events:
+events:(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)+
-
kind: "try_compile-v1"
backtrace:
@@ -16,7 +23,14 @@ events:
variable: "CMAKE_C_ABI_COMPILED"
cached: true
stdout: \|.*
- exitCode: 0
+ exitCode: 0(
+ -
+ kind: "message-v1"
+ backtrace:(
+ - "[^"]+")+
+ message: \|(
++ [^
+]*)*)*
-
kind: "try_run-v1"
backtrace: