google / google/googletest

`{gmock_stress_test,googletest-listener-test} --gtest_list_tests` assumes the tests are executed, instead of just listing the available tests

Open
#2,204 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.6k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

Long story short, using `--gtest_list_tests` should only list the available tests, not execute the tests:
```
$ /usr/tests/lib/googletest/gmock/gmock_stress_test --gtest_list_tests
StressTest.
CanUseGMockWithThreads

[ FATAL ] /usr/src/contrib/googletest/googlemock/test/gmock_stress_test.cc:317:: Condition exit_code != 0 failed. RUN_ALL_TESTS() did not fail as expected

Abort trap (core dumped)
```

This issue is similar to #453, which seems to have been fixed by "adding actual tests" in bad778caa.

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior with gmock_stress_test and inspect googlemock/test/gmock_stress_test.cc around line 317, then compare how --gtest_list_tests is handled by the listener-related test. Done means both gmock_stress_test and googletest-listener-test only list available tests with this option, without running tests, printing the fatal failure, or aborting.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.