You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a global test environment whose SetUp function calls GTEST_SKIP, the actual tests are still reported as executed in the test program's output, and as completed in the XML output.
Running the attached source results in the following output :
$ ./foobar --gtest_output=xml:output.xml
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
/home/daniel/zabawki/poligon5/main.cpp:8: Skipped
skipping everything
skipping everything
[----------] Global test environment tear-down
[==========] 2 tests from 2 test suites ran. (0 ms total)
[ PASSED ] 2 tests.
Meanwhile, the XML reports that the test results were completed and that the execution of each test took place at "time zero", though the root test suite's timestamp is set correctly :
I expected the usage of a GTEST_SKIP in a global test environment to be equivalent to a GTEST_SKIP in every single test case, and the output to be the following :
$ ./foobar
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 1 test from Foo
[ RUN ] Foo.Bar
/home/daniel/zabawki/poligon5/main.cpp:13: Skipped
foobar
[ SKIPPED ] Foo.Bar (0 ms)
[----------] 1 test from Foo (0 ms total)
[----------] 1 test from Bar
[ RUN ] Bar.Foo
/home/daniel/zabawki/poligon5/main.cpp:18: Skipped
barfoo
[ SKIPPED ] Bar.Foo (0 ms)
[----------] 1 test from Bar (0 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 2 test suites ran. (0 ms total)
[ PASSED ] 0 tests.
[ SKIPPED ] 2 tests, listed below:
[ SKIPPED ] Foo.Bar
[ SKIPPED ] Bar.Foo
In which case, the XML output also includes appropriate elements to indicate that test execution was skipped (and the timestamps are correct, too) :
The text was updated successfully, but these errors were encountered:
lighterowl
changed the title
[Bug]: Tests are reported as completed when GTEST_SKIP is used inside a environment's SetUp
[Bug]: Tests are reported as completed when GTEST_SKIP is used inside an environment's SetUp
Nov 5, 2024
Describe the issue
When adding a global test environment whose
SetUp
function callsGTEST_SKIP
, the actual tests are still reported as executed in the test program's output, and ascompleted
in the XML output.Running the attached source results in the following output :
Meanwhile, the XML reports that the test results were completed and that the execution of each test took place at "time zero", though the root test suite's timestamp is set correctly :
I expected the usage of a
GTEST_SKIP
in a global test environment to be equivalent to aGTEST_SKIP
in every single test case, and the output to be the following :In which case, the XML output also includes appropriate elements to indicate that test execution was skipped (and the timestamps are correct, too) :
Steps to reproduce the problem
What version of GoogleTest are you using?
d144031940543e15423a25ae5a8a74141044862f
What operating system and version are you using?
Arch Linux
What compiler and version are you using?
gcc version 14.2.1 20240910
What build system are you using?
cmake version 3.30.5
Additional context
No response
The text was updated successfully, but these errors were encountered: