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

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

Issue 8835008: Correctly handle the --arch argument to dart test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo Created 9 years 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 | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/test_runner.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 093e9aba0d130b7fa9f8fddabf67c45da52f74fd..2d398f2ab4034332e4159cae2986e5ee3f75b749 100644
--- a/tools/testing/dart/test_options.dart
+++ b/tools/testing/dart/test_options.dart
@@ -52,7 +52,7 @@ class TestOptionsParser {
['most', 'vm', 'dartc', 'frog', 'frogsh', 'leg'],
'vm'),
new _TestOptionSpecification(
- 'architecture',
+ 'arch',
'The architecture to run tests for',
['-a', '--arch'],
['all', 'ia32', 'x64', 'simarm'],
@@ -103,6 +103,13 @@ class TestOptionsParser {
['-h', '--help'],
[],
false,
+ 'bool'),
+ new _TestOptionSpecification(
+ 'verbose',
+ 'Verbose output',
+ ['-v', '--verbose'],
+ [],
+ false,
'bool')];
}
@@ -152,11 +159,14 @@ class TestOptionsParser {
value = arg.substring(2, arg.length);
} else {
name = arg;
- if ((i + 1) >= arguments.length) {
- print('No value supplied for option $name');
- return null;
+ // Boolean options do not have a value.
+ if (_getSpecification(name).type != 'bool') {
+ if ((i + 1) >= arguments.length) {
+ print('No value supplied for option $name');
+ return null;
+ }
+ value = arguments[++i];
}
- value = arguments[++i];
}
} else {
// The argument does not start with '-' or '--' and is
@@ -217,8 +227,8 @@ class TestOptionsParser {
}
// Expand the pseudo-values such as 'all'.
- if (configuration['architecture'] == 'all') {
- configuration['architecture'] = 'ia32,x64,simarm';
+ if (configuration['arch'] == 'all') {
+ configuration['arch'] = 'ia32,x64,simarm';
}
if (configuration['mode'] == 'all') {
configuration['mode'] = 'debug,release';
@@ -227,6 +237,11 @@ class TestOptionsParser {
configuration['component'] = 'vm,dartc';
}
+ // Use verbose progress indication for verbose output.
+ if (configuration['verbose']) {
+ configuration['progress'] = 'verbose';
+ }
+
// Create the artificial 'unchecked' option that test status files
// expect.
configuration['unchecked'] = !configuration['checked'];
@@ -263,12 +278,12 @@ class TestOptionsParser {
}
// Expand the architectures.
- var archs = configuration['architecture'];
+ var archs = configuration['arch'];
if (archs.contains(',')) {
var result = new List<Map>();
for (var arch in archs.split(',')) {
var newConfiguration = new Map.from(configuration);
- newConfiguration['architecture'] = arch;
+ newConfiguration['arch'] = arch;
result.addAll(_expandConfigurations(newConfiguration));
}
return result;
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698