mirror of
https://github.com/google/googletest.git
synced 2025-12-06 16:57:00 +08:00
gtest: Reword fail_if_no_test_selected_message for sharding and filtering.
Users have shown some confusion about the interaction between this flag, sharding, and --gtest_filter, so let's provide some more information. PiperOrigin-RevId: 776734799 Change-Id: Icdcf6aa056988095f15588758994604d326c0567
This commit is contained in:
parent
a45468c0fc
commit
c67de11737
@ -6092,7 +6092,11 @@ bool UnitTestImpl::RunAllTests() {
|
|||||||
constexpr char kNoTestsSelectedMessage[] =
|
constexpr char kNoTestsSelectedMessage[] =
|
||||||
"No tests were selected to run. Please make sure at least one test "
|
"No tests were selected to run. Please make sure at least one test "
|
||||||
"exists and is not disabled! If the test is sharded, you may have "
|
"exists and is not disabled! If the test is sharded, you may have "
|
||||||
"defined more shards than test cases, which is wasteful.";
|
"defined more shards than test cases, which is wasteful. If you also "
|
||||||
|
"defined --gtest_filter, that filter is taken into account, so "
|
||||||
|
"shards with no matching test cases will hit this error. Either "
|
||||||
|
"disable sharding, set --gtest_fail_if_no_test_selected=false, or "
|
||||||
|
"remove the filter to resolve this error.";
|
||||||
ColoredPrintf(GTestColor::kRed, "%s\n", kNoTestsSelectedMessage);
|
ColoredPrintf(GTestColor::kRed, "%s\n", kNoTestsSelectedMessage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user