MCPcopy Create free account
hub / github.com/apache/singa / ShouldRunTestOnShard

Function ShouldRunTestOnShard

test/gtest/gtest-all.cc:5928–5930  ·  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

5926// some arbitrary but unique non-negative integer assigned to each test
5927// method. Assumes that 0 <= shard_index < total_shards.
5928bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
5929 return (test_id % total_shards) == shard_index;
5930}
5931
5932// Compares the name of each test with the user-specified filter to
5933// 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