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

Side by Side Diff: tools/testing/dart/test_options.dart

Issue 10021048: Remove need to instantiate Platform and make methods static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add stable test binaries. Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("test_options_parser"); 5 #library("test_options_parser");
6 6
7 #import("dart:io"); 7 #import("dart:io");
8 #import("dart:builtin"); 8 #import("dart:builtin");
9 #import("drt_updater.dart"); 9 #import("drt_updater.dart");
10 10
11 List<String> defaultTestSelectors = 11 List<String> defaultTestSelectors =
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 'arch', 110 'arch',
111 'The architecture to run tests for', 111 'The architecture to run tests for',
112 ['-a', '--arch'], 112 ['-a', '--arch'],
113 ['all', 'ia32', 'x64', 'simarm'], 113 ['all', 'ia32', 'x64', 'simarm'],
114 'ia32'), 114 'ia32'),
115 new _TestOptionSpecification( 115 new _TestOptionSpecification(
116 'system', 116 'system',
117 'The operating system to run tests on', 117 'The operating system to run tests on',
118 ['-s', '--system'], 118 ['-s', '--system'],
119 ['linux', 'macos', 'windows'], 119 ['linux', 'macos', 'windows'],
120 new Platform().operatingSystem()), 120 Platform.operatingSystem()),
121 new _TestOptionSpecification( 121 new _TestOptionSpecification(
122 'checked', 122 'checked',
123 'Run tests in checked mode', 123 'Run tests in checked mode',
124 ['--checked'], 124 ['--checked'],
125 [], 125 [],
126 false, 126 false,
127 'bool'), 127 'bool'),
128 new _TestOptionSpecification( 128 new _TestOptionSpecification(
129 'host_checked', 129 'host_checked',
130 'Run compiler in checked mode', 130 'Run compiler in checked mode',
(...skipping 20 matching lines...) Expand all
151 'Print a summary report of the number of tests, by expectation', 151 'Print a summary report of the number of tests, by expectation',
152 ['--report'], 152 ['--report'],
153 [], 153 [],
154 false, 154 false,
155 'bool'), 155 'bool'),
156 new _TestOptionSpecification( 156 new _TestOptionSpecification(
157 'tasks', 157 'tasks',
158 'The number of parallel tasks to run', 158 'The number of parallel tasks to run',
159 ['-j', '--tasks'], 159 ['-j', '--tasks'],
160 [], 160 [],
161 new Platform().numberOfProcessors(), 161 Platform.numberOfProcessors(),
162 'int'), 162 'int'),
163 new _TestOptionSpecification( 163 new _TestOptionSpecification(
164 'shards', 164 'shards',
165 'The number of instances that the tests will be sharded over', 165 'The number of instances that the tests will be sharded over',
166 ['--shards'], 166 ['--shards'],
167 [], 167 [],
168 1, 168 1,
169 'int'), 169 'int'),
170 new _TestOptionSpecification( 170 new _TestOptionSpecification(
171 'shard', 171 'shard',
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 break; 398 break;
399 case 'none': 399 case 'none':
400 isValid = (const ['vm', 'drt', 400 isValid = (const ['vm', 'drt',
401 'dartium']).indexOf(config['runtime']) >= 0; 401 'dartium']).indexOf(config['runtime']) >= 0;
402 } 402 }
403 if (!isValid) { 403 if (!isValid) {
404 print("Warning: combination of ${config['compiler']} and " + 404 print("Warning: combination of ${config['compiler']} and " +
405 "${config['runtime']} is invalid. Skipping this combination."); 405 "${config['runtime']} is invalid. Skipping this combination.");
406 } 406 }
407 if (config['runtime'] == 'ie' && 407 if (config['runtime'] == 'ie' &&
408 new Platform().operatingSystem() != 'windows') { 408 Platform.operatingSystem() != 'windows') {
409 isValid = false; 409 isValid = false;
410 print("Warning cannot run Internet Explorer on non-Windows operating" + 410 print("Warning cannot run Internet Explorer on non-Windows operating" +
411 " system."); 411 " system.");
412 } 412 }
413 if (config['shard'] < 1 || config['shard'] > config['shards']) { 413 if (config['shard'] < 1 || config['shard'] > config['shards']) {
414 isValid = false; 414 isValid = false;
415 print("Error: shard index is ${config['shard']} out of " + 415 print("Error: shard index is ${config['shard']} out of " +
416 "${config['shards']} shards"); 416 "${config['shards']} shards");
417 } 417 }
418 if (config['runtime'] == 'dartium' && config['compiler'] == 'none' && 418 if (config['runtime'] == 'dartium' && config['compiler'] == 'none' &&
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 return option; 627 return option;
628 } 628 }
629 } 629 }
630 print('Unknown test option $name'); 630 print('Unknown test option $name');
631 exit(1); 631 exit(1);
632 } 632 }
633 633
634 634
635 List<_TestOptionSpecification> _options; 635 List<_TestOptionSpecification> _options;
636 } 636 }
OLDNEW
« 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