Fired before each iteration of tests starts.
| 4620 | |
| 4621 | // Fired before each iteration of tests starts. |
| 4622 | void PrettyUnitTestResultPrinter::OnTestIterationStart( |
| 4623 | const UnitTest& unit_test, int iteration) { |
| 4624 | if (GTEST_FLAG(repeat) != 1) |
| 4625 | printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); |
| 4626 | |
| 4627 | const char* const filter = GTEST_FLAG(filter).c_str(); |
| 4628 | |
| 4629 | // Prints the filter if it's not *. This reminds the user that some |
| 4630 | // tests may be skipped. |
| 4631 | if (!String::CStringEquals(filter, kUniversalFilter)) { |
| 4632 | ColoredPrintf(COLOR_YELLOW, |
| 4633 | "Note: %s filter = %s\n", GTEST_NAME_, filter); |
| 4634 | } |
| 4635 | |
| 4636 | if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { |
| 4637 | const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); |
| 4638 | ColoredPrintf(COLOR_YELLOW, |
| 4639 | "Note: This is test shard %d of %s.\n", |
| 4640 | static_cast<int>(shard_index) + 1, |
| 4641 | internal::posix::GetEnv(kTestTotalShards)); |
| 4642 | } |
| 4643 | |
| 4644 | if (GTEST_FLAG(shuffle)) { |
| 4645 | ColoredPrintf(COLOR_YELLOW, |
| 4646 | "Note: Randomizing tests' orders with a seed of %d .\n", |
| 4647 | unit_test.random_seed()); |
| 4648 | } |
| 4649 | |
| 4650 | ColoredPrintf(COLOR_GREEN, "[==========] "); |
| 4651 | printf("Running %s from %s.\n", |
| 4652 | FormatTestCount(unit_test.test_to_run_count()).c_str(), |
| 4653 | FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); |
| 4654 | fflush(stdout); |
| 4655 | } |
| 4656 | |
| 4657 | void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( |
| 4658 | const UnitTest& /*unit_test*/) { |
no test coverage detected