Fired before each iteration of tests starts.
| 3378 | |
| 3379 | // Fired before each iteration of tests starts. |
| 3380 | void PrettyUnitTestResultPrinter::OnTestIterationStart( |
| 3381 | const UnitTest& unit_test, int iteration) { |
| 3382 | if (GTEST_FLAG_GET(repeat) != 1) |
| 3383 | printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); |
| 3384 | |
| 3385 | std::string f = GTEST_FLAG_GET(filter); |
| 3386 | const char* const filter = f.c_str(); |
| 3387 | |
| 3388 | // Prints the filter if it's not *. This reminds the user that some |
| 3389 | // tests may be skipped. |
| 3390 | if (!String::CStringEquals(filter, kUniversalFilter)) { |
| 3391 | ColoredPrintf(GTestColor::kYellow, "Note: %s filter = %s\n", GTEST_NAME_, |
| 3392 | filter); |
| 3393 | } |
| 3394 | |
| 3395 | if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { |
| 3396 | const int32_t shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); |
| 3397 | ColoredPrintf(GTestColor::kYellow, "Note: This is test shard %d of %s.\n", |
| 3398 | static_cast<int>(shard_index) + 1, |
| 3399 | internal::posix::GetEnv(kTestTotalShards)); |
| 3400 | } |
| 3401 | |
| 3402 | if (GTEST_FLAG_GET(shuffle)) { |
| 3403 | ColoredPrintf(GTestColor::kYellow, |
| 3404 | "Note: Randomizing tests' orders with a seed of %d .\n", |
| 3405 | unit_test.random_seed()); |
| 3406 | } |
| 3407 | |
| 3408 | ColoredPrintf(GTestColor::kGreen, "[==========] "); |
| 3409 | printf("Running %s from %s.\n", |
| 3410 | FormatTestCount(unit_test.test_to_run_count()).c_str(), |
| 3411 | FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); |
| 3412 | fflush(stdout); |
| 3413 | } |
| 3414 | |
| 3415 | void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( |
| 3416 | const UnitTest& /*unit_test*/) { |
no test coverage detected