MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / OnTestIterationStart

Method OnTestIterationStart

rtpose_wrapper/src/gtest/gtest-all.cpp:4018–4051  ·  view source on GitHub ↗

Fired before each iteration of tests starts.

Source from the content-addressed store, hash-verified

4016
4017 // Fired before each iteration of tests starts.
4018void PrettyUnitTestResultPrinter::OnTestIterationStart(
4019 const UnitTest& unit_test, int iteration) {
4020 if (GTEST_FLAG(repeat) != 1)
4021 printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
4022
4023 const char* const filter = GTEST_FLAG(filter).c_str();
4024
4025 // Prints the filter if it's not *. This reminds the user that some
4026 // tests may be skipped.
4027 if (!internal::String::CStringEquals(filter, kUniversalFilter)) {
4028 ColoredPrintf(COLOR_YELLOW,
4029 "Note: %s filter = %s\n", GTEST_NAME_, filter);
4030 }
4031
4032 if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
4033 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
4034 ColoredPrintf(COLOR_YELLOW,
4035 "Note: This is test shard %d of %s.\n",
4036 static_cast<int>(shard_index) + 1,
4037 internal::posix::GetEnv(kTestTotalShards));
4038 }
4039
4040 if (GTEST_FLAG(shuffle)) {
4041 ColoredPrintf(COLOR_YELLOW,
4042 "Note: Randomizing tests' orders with a seed of %d .\n",
4043 unit_test.random_seed());
4044 }
4045
4046 ColoredPrintf(COLOR_GREEN, "[==========] ");
4047 printf("Running %s from %s.\n",
4048 FormatTestCount(unit_test.test_to_run_count()).c_str(),
4049 FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
4050 fflush(stdout);
4051}
4052
4053void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(
4054 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