mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
GoogleTest: Add working directory to gtest_discover_tests error message
If the working directory didn't exist, the old message just says:
Error running test executable.
Path: '<Path to test executable>'
Result: No such file or directory
Output:
This leads the user to the conclusion that the test executable doesn't
exist, which isn't true. Make the true cause visible by reporting the
working directory in the error message.
This commit is contained in:
committed by
Brad King
parent
ba41ca758a
commit
2ea216a6bb
@@ -112,6 +112,7 @@ function(gtest_discover_tests_impl)
|
||||
message(FATAL_ERROR
|
||||
"Error running test executable.\n"
|
||||
" Path: '${path}'\n"
|
||||
" Working directory: '${_TEST_WORKING_DIR}'\n"
|
||||
" Result: ${result}\n"
|
||||
" Output:\n"
|
||||
" ${output}\n"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
( *|[0-9]+>) Error running test executable.
|
||||
?( *|[0-9]+>)
|
||||
( *|[0-9]+>) Path: '.*discovery_timeout_test(\.exe)?'
|
||||
( *|[0-9]+>) Working directory: '[^']*/Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout'
|
||||
( *|[0-9]+>) Result: Process terminated due to timeout
|
||||
( *|[0-9]+>) Output:
|
||||
( *|[0-9]+>) +
|
||||
|
||||
@@ -2,6 +2,7 @@ CMake Error at .*GoogleTestAddTests.cmake:[0-9]+ \(message\):
|
||||
[ \t]*Error running test executable.
|
||||
+
|
||||
[ \t]*Path: '.*discovery_timeout_test(\.exe)?'
|
||||
[ \t]*Working directory: '[^']*/Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout'
|
||||
[ \t]*Result: Process terminated due to timeout
|
||||
[ \t]*Output:
|
||||
[ \t]*timeout.
|
||||
|
||||
Reference in New Issue
Block a user