GoogleTest: Please add support for GTEST_SKIP()
Hi,
I've tried GTEST_SKIP() in a test and although Google test outputs that the test is indeed skipped, when this is run with ctest, test is marked as passed.
ctest output:
Test project my_project
Start 127: MeaningfulTestParameters/test/param#GetParam()=(4-byteobject<05-0000-00>,3)
1/1 Test #127: MeaningfulTestParameters/test/param#GetParam()=(4-byteobject<05-0000-00>,3) ... Passed 0.18 sec
100% tests passed, 0 tests failed out of 1
Full output with -VV:
UpdateCTestConfiguration from :my-project/build/DartConfiguration.tcl
Parse Config file:my-project/build/DartConfiguration.tcl
UpdateCTestConfiguration from :my-project/build/DartConfiguration.tcl
Parse Config file:my-project/build/DartConfiguration.tcl
Test project my-project/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 127
Start 127: MeaningfulTestParameters/test/param#GetParam()=(4-byteobject<05-0000-00>,3)
127: Test command: my-project/build/test-exec "--gtest_filter=MeaningfulTestParameters/test/param" "--gtest_also_run_disabled_tests"
127: Test timeout computed to be: 1500
127: Running main() from .../third_party/googletest/googletest/src/gtest_main.cc
127: Note: Google Test filter = MeaningfulTestParameters/test/param
127: [==========] Running 1 test from 1 test suite.
127: [----------] Global test environment set-up.
127: [----------] 1 test from MeaningfulTestParameters/test
127: [ RUN ] MeaningfulTestParameters/test/param
127: [ SKIPPED ] MeaningfulTestParameters/test/param (0 ms)
127: [----------] 1 test from MeaningfulTestParameters/test (0 ms total)
127:
127: [----------] Global test environment tear-down
127: [==========] 1 test from 1 test suite ran. (0 ms total)
127: [ PASSED ] 0 tests.
127: [ SKIPPED ] 1 test, listed below:
127: [ SKIPPED ] MeaningfulTestParameters/test/param
1/1 Test #127: MeaningfulTestParameters/test/param#GetParam()=(4-byteobject<05-0000-00>,3) ... Passed 0.18 sec
The following tests passed:
MeaningfulTestParameters/test/param#GetParam()=(4-byteobject<05-0000-00>,3)
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 0.21 sec
Ctest already handles the way gtest disables test (DISABLED_*) and outputs something that ends with:
..***Not Run (Disabled)
I know that GTEST_SKIP() hasn't make its way to a stable build, but it's a year old now, could you please add support for this ?
Thanks.
Edited by Brad King