Chromium Code Reviews| Index: tools/testing/dart/test_options.dart |
| diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart |
| index 1b023e131feb97811aa4d41881884554a73fdd4d..88f98862f4e096894543a91ac747b37bb205de85 100644 |
| --- a/tools/testing/dart/test_options.dart |
| +++ b/tools/testing/dart/test_options.dart |
| @@ -166,6 +166,20 @@ is 'dart file.dart' and you specify special command |
| new Platform().numberOfProcessors(), |
| 'int'), |
| new _TestOptionSpecification( |
|
Bill Hesse
2012/03/28 22:46:19
Since nobody replied to Kasper's suggestion of --s
|
| + 'shards', |
| + 'The number of instances that the tests will be sharded over', |
| + ['--shards'], |
| + [], |
| + 1, |
| + 'int'), |
| + new _TestOptionSpecification( |
| + 'shard', |
| + 'The index of this instance when running in sharded mode', |
| + ['--shard'], |
| + [], |
| + 1, |
| + 'int'), |
| + new _TestOptionSpecification( |
| 'help', |
| 'Print list of options', |
| ['-h', '--help'], |
| @@ -356,7 +370,8 @@ is 'dart file.dart' and you specify special command |
| } |
| List<Map> expandedConfigs = _expandConfigurations(configuration); |
| - return expandedConfigs.filter(_isValidConfig); |
| + List<Map> result = expandedConfigs.filter(_isValidConfig); |
| + return result.isEmpty() ? null : result; |
| } |
| /** |
| @@ -392,6 +407,11 @@ is 'dart file.dart' and you specify special command |
| print("Warning cannot run Internet Explorer on non-Windows operating" + |
| " system."); |
| } |
| + if (config['shard'] < 1 || config['shard'] > config['shards']) { |
| + isValid = false; |
| + print("Error: shard index is ${config['shard']} out of " + |
| + "${config['shards']} shards"); |
| + } |
| return isValid; |
| } |