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