mirror of
https://github.com/google/googletest.git
synced 2025-12-06 08:46:50 +08:00
Automated rollback of commit 37678c92fb183b148163dd173430b4ab88586a26.
PiperOrigin-RevId: 829765029 Change-Id: Ia5534b109e0abfd17a74d89ce58d6588a6255f94
This commit is contained in:
parent
37678c92fb
commit
085af2cc08
@ -6088,15 +6088,17 @@ bool UnitTestImpl::RunAllTests() {
|
|||||||
repeater->OnEnvironmentsTearDownEnd(*parent_);
|
repeater->OnEnvironmentsTearDownEnd(*parent_);
|
||||||
}
|
}
|
||||||
} else if (GTEST_FLAG_GET(fail_if_no_test_selected)) {
|
} else if (GTEST_FLAG_GET(fail_if_no_test_selected)) {
|
||||||
// If there were no tests to run, bail if we were requested to be strict.
|
// If there were no tests to run, bail if we were requested to be
|
||||||
|
// strict.
|
||||||
constexpr char kNoTestsSelectedMessage[] =
|
constexpr char kNoTestsSelectedMessage[] =
|
||||||
"No tests were selected to run. Please make sure at least one test "
|
"No tests ran. Check that tests exist and are not disabled or "
|
||||||
"exists and is not disabled! If the test is sharded, you may have "
|
"filtered out.\n\n"
|
||||||
"defined more shards than test cases, which is wasteful. If you also "
|
"For sharded runs, this error indicates an empty shard. This can "
|
||||||
"defined --gtest_filter, that filter is taken into account, so "
|
"happen if you have more shards than tests, or if --gtest_filter "
|
||||||
"shards with no matching test cases will hit this error. Either "
|
"leaves a shard with no tests.\n\n"
|
||||||
"disable sharding, set --gtest_fail_if_no_test_selected=false, or "
|
"To permit empty shards (e.g., when debugging with a filter), "
|
||||||
"remove the filter to resolve this error.";
|
"specify \n"
|
||||||
|
"--gtest_fail_if_no_test_selected=false.";
|
||||||
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