diff options
author | Brad King <brad.king@kitware.com> | 2022-11-08 14:17:52 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-11-08 14:18:01 (GMT) |
commit | 7e0c00c25117c85e98666fc07eb07a2e53a59e33 (patch) | |
tree | 61d06022571a3ab45849fcfc96faa79ced593b03 /Tests | |
parent | 6c48f5dbc0ad25a80922f11951ebeef7f6b85f73 (diff) | |
parent | f54963e60f3718bfb3d526097252dcf64fa2f34f (diff) | |
download | CMake-7e0c00c25117c85e98666fc07eb07a2e53a59e33.zip CMake-7e0c00c25117c85e98666fc07eb07a2e53a59e33.tar.gz CMake-7e0c00c25117c85e98666fc07eb07a2e53a59e33.tar.bz2 |
Merge topic 'googletest-addtests-skipped'
f54963e60f GoogleTest: Reports skipped test with gtest_add_tests
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7868
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTest-skip-test-stdout.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTest.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/skip_test.cpp | 7 |
3 files changed, 15 insertions, 1 deletions
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-skip-test-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-skip-test-stdout.txt index 8d7527c..18f133a 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest-skip-test-stdout.txt +++ b/Tests/RunCMake/GoogleTest/GoogleTest-skip-test-stdout.txt @@ -1,10 +1,13 @@ Test project .* *Start +[0-9]+: skip_test\.test1 *[0-9]+/[0-9]+ +Test +#[0-9]+: skip_test\.test1 \.+\*\*\*Skipped +[0-9.]+ sec + *Start +[0-9]+: skip_test\.test1 + *[0-9]+/[0-9]+ +Test +#[0-9]+: skip_test\.test1 \.+\*\*\*Skipped +[0-9.]+ sec -100% tests passed, 0 tests failed out of 1 +100% tests passed, 0 tests failed out of 2 Total Test time \(real\) = +[0-9.]+ sec The following tests did not run: [ 0-9]+- skip_test\.test1 \(Skipped\) +[ 0-9]+- skip_test\.test1 \(Skipped\) diff --git a/Tests/RunCMake/GoogleTest/GoogleTest.cmake b/Tests/RunCMake/GoogleTest/GoogleTest.cmake index 221d6ad..2ed43fc 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest.cmake +++ b/Tests/RunCMake/GoogleTest/GoogleTest.cmake @@ -78,3 +78,7 @@ xcode_sign_adhoc(skip_test) gtest_discover_tests( skip_test ) + +gtest_add_tests( + TARGET skip_test +) diff --git a/Tests/RunCMake/GoogleTest/skip_test.cpp b/Tests/RunCMake/GoogleTest/skip_test.cpp index 2bc9fe1..919b1b3 100644 --- a/Tests/RunCMake/GoogleTest/skip_test.cpp +++ b/Tests/RunCMake/GoogleTest/skip_test.cpp @@ -1,6 +1,13 @@ #include <iostream> #include <string> +/* Having this as comment lets gtest_add_tests recognizes the test we fake + here without requiring googletest +TEST_F( skip_test, test1 ) +{ +} +*/ + int main(int argc, char** argv) { // Note: GoogleTest.cmake doesn't actually depend on Google Test as such; |