MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / ShouldRunTestOnShard

Function ShouldRunTestOnShard

tests/gtest/gtest-all.cc:6908–6910  ·  view source on GitHub ↗

Given the total number of shards, the shard index, and the test id, returns true iff the test should be run on this shard. The test id is some arbitrary but unique non-negative integer assigned to each test method. Assumes that 0 <= shard_index < total_shards.

Source from the content-addressed store, hash-verified

6906// some arbitrary but unique non-negative integer assigned to each test
6907// method. Assumes that 0 <= shard_index < total_shards.
6908bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
6909 return (test_id % total_shards) == shard_index;
6910}
6911
6912// Compares the name of each test with the user-specified filter to
6913// decide whether the test should be run, then records the result in

Callers 1

FilterTestsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected