Fixes off-by-one error in a message about test sharding (by David Glasser).
This commit is contained in:
parent
6642ca8cd4
commit
0980b4bd66
|
@ -2716,9 +2716,10 @@ void PrettyUnitTestResultPrinter::OnTestIterationStart(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
|
if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
|
||||||
|
const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
|
||||||
ColoredPrintf(COLOR_YELLOW,
|
ColoredPrintf(COLOR_YELLOW,
|
||||||
"Note: This is test shard %s of %s.\n",
|
"Note: This is test shard %d of %s.\n",
|
||||||
internal::posix::GetEnv(kTestShardIndex),
|
static_cast<int>(shard_index) + 1,
|
||||||
internal::posix::GetEnv(kTestTotalShards));
|
internal::posix::GetEnv(kTestTotalShards));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -697,7 +697,7 @@ Note: Google Test filter = *DISABLED_*
|
||||||
[==========] 1 test from 1 test case ran.
|
[==========] 1 test from 1 test case ran.
|
||||||
[ PASSED ] 1 test.
|
[ PASSED ] 1 test.
|
||||||
Note: Google Test filter = PassingTest.*
|
Note: Google Test filter = PassingTest.*
|
||||||
Note: This is test shard 1 of 2.
|
Note: This is test shard 2 of 2.
|
||||||
[==========] Running 1 test from 1 test case.
|
[==========] Running 1 test from 1 test case.
|
||||||
[----------] Global test environment set-up.
|
[----------] Global test environment set-up.
|
||||||
[----------] 1 test from PassingTest
|
[----------] 1 test from PassingTest
|
||||||
|
|
Loading…
Reference in New Issue
Block a user