Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: tools/testing/dart/test_options.dart

Issue 9834070: Shard tests run by test.dart, so they can be distributed to multiple machines. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698