Fired before each iteration of tests starts.
| 2713 | |
| 2714 | // Fired before each iteration of tests starts. |
| 2715 | void PrettyUnitTestResultPrinter::OnTestIterationStart( |
| 2716 | const UnitTest& unit_test, int iteration) { |
| 2717 | if (GTEST_FLAG(repeat) != 1) |
| 2718 | printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); |
| 2719 | |
| 2720 | const char* const filter = GTEST_FLAG(filter).c_str(); |
| 2721 | |
| 2722 | // Prints the filter if it's not *. This reminds the user that some |
| 2723 | // tests may be skipped. |
| 2724 | if (!internal::String::CStringEquals(filter, kUniversalFilter)) { |
| 2725 | ColoredPrintf(COLOR_YELLOW, |
| 2726 | "Note: %s filter = %s\n", GTEST_NAME_, filter); |
| 2727 | } |
| 2728 | |
| 2729 | if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { |
| 2730 | const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); |
| 2731 | ColoredPrintf(COLOR_YELLOW, |
| 2732 | "Note: This is test shard %d of %s.\n", |
| 2733 | static_cast<int>(shard_index) + 1, |
| 2734 | internal::posix::GetEnv(kTestTotalShards)); |
| 2735 | } |
| 2736 | |
| 2737 | if (GTEST_FLAG(shuffle)) { |
| 2738 | ColoredPrintf(COLOR_YELLOW, |
| 2739 | "Note: Randomizing tests' orders with a seed of %d .\n", |
| 2740 | unit_test.random_seed()); |
| 2741 | } |
| 2742 | |
| 2743 | ColoredPrintf(COLOR_GREEN, "[==========] "); |
| 2744 | printf("Running %s from %s.\n", |
| 2745 | FormatTestCount(unit_test.test_to_run_count()).c_str(), |
| 2746 | FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str()); |
| 2747 | fflush(stdout); |
| 2748 | } |
| 2749 | |
| 2750 | void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( |
| 2751 | const UnitTest& /*unit_test*/) { |
no test coverage detected