#5078·googletest

Existing fail_if_no_test_selected regression test is not registered in the public build

Author: HostX0Created Aug 30, 2026Updated Aug 30, 2026

Describe the issue

The repository contains a dedicated regression test for --gtest_fail_if_no_test_selected:

googletest/test/googletest-fail-if-no-test-selected-test.py

The test was added together with the feature in commit 28e9d1f26771c6517c3b4be10254887673c94018, but it does not appear to be registered as a test target in the current public build definitions.

As a result, an existing regression test for this behavior appears to be present in the repository without being executed by the public test graph.

I would expect the existing test to be registered so that regressions in --gtest_fail_if_no_test_selected are covered by the public test suite.

Steps to reproduce the problem

On current main:

git checkout 36ba75f0ad5383a9759f17f3f72fd4661c72cb6d

test -f googletest/test/googletest-fail-if-no-test-selected-test.py \
  && echo "regression test exists"

grep -n "googletest-fail-if-no-test-selected-test" \
  googletest/test/BUILD.bazel \
  googletest/CMakeLists.txt

What version of GoogleTest are you using?

Current main:

36ba75f0ad5383a9759f17f3f72fd4661c72cb6d

What operating system and version are you using?

Not OS-specific. This is a public build/test registration issue reproducible by inspecting the repository at the commit above.

What compiler and version are you using?

Not compiler-specific. No compilation is required to reproduce the missing test registration.

What build system are you using?

Bazel is the primary build-system observation (googletest/test/BUILD.bazel).

The same dedicated test also does not appear to be registered in googletest/CMakeLists.txt.

No specific local Bazel/CMake version is required to reproduce the issue because the missing registration is directly observable in the build definitions on current main.

Additional context

The feature and its dedicated Python regression test were introduced together, so this appears to be test wiring rather than a request for new product behavior.

A repository search for googletest-fail-if-no-test-selected-test currently finds the test source but not a corresponding public build target.

Would a small PR that registers the existing regression test in the public Bazel test graph, reusing the existing helper binaries and making no production behavior changes, be welcome?

I would prefer to keep the initial change narrowly scoped to Bazel if that is easier to review, and handle any CMake parity separately if desired.