MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / OnTestIterationStart

Method OnTestIterationStart

test/common/gtest/gtest.cpp:4492–4525  ·  view source on GitHub ↗

Fired before each iteration of tests starts.

Source from the content-addressed store, hash-verified

4490
4491 // Fired before each iteration of tests starts.
4492void PrettyUnitTestResultPrinter::OnTestIterationStart(
4493 const UnitTest& unit_test, int iteration) {
4494 if (GTEST_FLAG(repeat) != 1)
4495 printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
4496
4497 const char* const filter = GTEST_FLAG(filter).c_str();
4498
4499 // Prints the filter if it's not *. This reminds the user that some
4500 // tests may be skipped.
4501 if (!String::CStringEquals(filter, kUniversalFilter)) {
4502 ColoredPrintf(COLOR_YELLOW,
4503 "Note: %s filter = %s\n", GTEST_NAME_, filter);
4504 }
4505
4506 if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
4507 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
4508 ColoredPrintf(COLOR_YELLOW,
4509 "Note: This is test shard %d of %s.\n",
4510 static_cast<int>(shard_index) + 1,
4511 internal::posix::GetEnv(kTestTotalShards));
4512 }
4513
4514 if (GTEST_FLAG(shuffle)) {
4515 ColoredPrintf(COLOR_YELLOW,
4516 "Note: Randomizing tests' orders with a seed of %d .\n",
4517 unit_test.random_seed());
4518 }
4519
4520 ColoredPrintf(COLOR_GREEN, "[==========] ");
4521 printf("Running %s from %s.\n",
4522 FormatTestCount(unit_test.test_to_run_count()).c_str(),
4523 FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
4524 fflush(stdout);
4525}
4526
4527void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(
4528 const UnitTest& /*unit_test*/) {

Callers 1

RunAllTestsMethod · 0.45

Calls 10

ColoredPrintfFunction · 0.85
ShouldShardFunction · 0.85
Int32FromEnvOrDieFunction · 0.85
GetEnvFunction · 0.85
FormatTestCountFunction · 0.85
FormatTestCaseCountFunction · 0.85
random_seedMethod · 0.80
test_to_run_countMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected