@@ -6088,15 +6088,17 @@ bool UnitTestImpl::RunAllTests() {
60886088 repeater->OnEnvironmentsTearDownEnd (*parent_);
60896089 }
60906090 } else if (GTEST_FLAG_GET (fail_if_no_test_selected)) {
6091- // If there were no tests to run, bail if we were requested to be strict.
6091+ // If there were no tests to run, bail if we were requested to be
6092+ // strict.
60926093 constexpr char kNoTestsSelectedMessage [] =
6093- " No tests were selected to run. Please make sure at least one test "
6094- " exists and is not disabled! If the test is sharded, you may have "
6095- " defined more shards than test cases, which is wasteful. If you also "
6096- " defined --gtest_filter, that filter is taken into account, so "
6097- " shards with no matching test cases will hit this error. Either "
6098- " disable sharding, set --gtest_fail_if_no_test_selected=false, or "
6099- " remove the filter to resolve this error." ;
6094+ " No tests ran. Check that tests exist and are not disabled or "
6095+ " filtered out.\n\n "
6096+ " For sharded runs, this error indicates an empty shard. This can "
6097+ " happen if you have more shards than tests, or if --gtest_filter "
6098+ " leaves a shard with no tests.\n\n "
6099+ " To permit empty shards (e.g., when debugging with a filter), "
6100+ " specify \n "
6101+ " --gtest_fail_if_no_test_selected=false." ;
61006102 ColoredPrintf (GTestColor::kRed , " %s\n " , kNoTestsSelectedMessage );
61016103 return false ;
61026104 }
0 commit comments