diff options
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/tradefed/invoker/shard/StrictShardHelper.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/tradefed/invoker/shard/StrictShardHelper.java b/src/com/android/tradefed/invoker/shard/StrictShardHelper.java index 4927f1994..b0d179bf6 100644 --- a/src/com/android/tradefed/invoker/shard/StrictShardHelper.java +++ b/src/com/android/tradefed/invoker/shard/StrictShardHelper.java @@ -39,12 +39,13 @@ public class StrictShardHelper extends ShardHelper { IConfiguration config, IInvocationContext context, IRescheduler rescheduler) { Integer shardCount = config.getCommandOptions().getShardCount(); Integer shardIndex = config.getCommandOptions().getShardIndex(); - if (shardCount == null) { - return false; - } + if (shardIndex == null) { return super.shardConfig(config, context, rescheduler); } + if (shardCount == null) { + throw new RuntimeException("shard-count is null while shard-index is " + shardIndex); + } // Split tests in place, without actually sharding. if (!config.getCommandOptions().shouldUseTfSharding()) { |