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

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

Issue 10351011: Change Platform members to getters instead of methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding new test binaries Created 8 years, 7 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) 2012, 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
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 'arch', 106 'arch',
107 'The architecture to run tests for', 107 'The architecture to run tests for',
108 ['-a', '--arch'], 108 ['-a', '--arch'],
109 ['all', 'ia32', 'x64', 'simarm'], 109 ['all', 'ia32', 'x64', 'simarm'],
110 'ia32'), 110 'ia32'),
111 new _TestOptionSpecification( 111 new _TestOptionSpecification(
112 'system', 112 'system',
113 'The operating system to run tests on', 113 'The operating system to run tests on',
114 ['-s', '--system'], 114 ['-s', '--system'],
115 ['linux', 'macos', 'windows'], 115 ['linux', 'macos', 'windows'],
116 Platform.operatingSystem()), 116 Platform.operatingSystem),
117 new _TestOptionSpecification( 117 new _TestOptionSpecification(
118 'checked', 118 'checked',
119 'Run tests in checked mode', 119 'Run tests in checked mode',
120 ['--checked'], 120 ['--checked'],
121 [], 121 [],
122 false, 122 false,
123 'bool'), 123 'bool'),
124 new _TestOptionSpecification( 124 new _TestOptionSpecification(
125 'host_checked', 125 'host_checked',
126 'Run compiler in checked mode', 126 'Run compiler in checked mode',
(...skipping 20 matching lines...) Expand all
147 'Print a summary report of the number of tests, by expectation', 147 'Print a summary report of the number of tests, by expectation',
148 ['--report'], 148 ['--report'],
149 [], 149 [],
150 false, 150 false,
151 'bool'), 151 'bool'),
152 new _TestOptionSpecification( 152 new _TestOptionSpecification(
153 'tasks', 153 'tasks',
154 'The number of parallel tasks to run', 154 'The number of parallel tasks to run',
155 ['-j', '--tasks'], 155 ['-j', '--tasks'],
156 [], 156 [],
157 Platform.numberOfProcessors(), 157 Platform.numberOfProcessors,
158 'int'), 158 'int'),
159 new _TestOptionSpecification( 159 new _TestOptionSpecification(
160 'shards', 160 'shards',
161 'The number of instances that the tests will be sharded over', 161 'The number of instances that the tests will be sharded over',
162 ['--shards'], 162 ['--shards'],
163 [], 163 [],
164 1, 164 1,
165 'int'), 165 'int'),
166 new _TestOptionSpecification( 166 new _TestOptionSpecification(
167 'shard', 167 'shard',
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 break; 411 break;
412 case 'none': 412 case 'none':
413 isValid = (const ['vm', 'drt', 413 isValid = (const ['vm', 'drt',
414 'dartium']).indexOf(config['runtime']) >= 0; 414 'dartium']).indexOf(config['runtime']) >= 0;
415 } 415 }
416 if (!isValid) { 416 if (!isValid) {
417 print("Warning: combination of ${config['compiler']} and " + 417 print("Warning: combination of ${config['compiler']} and " +
418 "${config['runtime']} is invalid. Skipping this combination."); 418 "${config['runtime']} is invalid. Skipping this combination.");
419 } 419 }
420 if (config['runtime'] == 'ie' && 420 if (config['runtime'] == 'ie' &&
421 Platform.operatingSystem() != 'windows') { 421 Platform.operatingSystem != 'windows') {
422 isValid = false; 422 isValid = false;
423 print("Warning cannot run Internet Explorer on non-Windows operating" + 423 print("Warning cannot run Internet Explorer on non-Windows operating" +
424 " system."); 424 " system.");
425 } 425 }
426 if (config['shard'] < 1 || config['shard'] > config['shards']) { 426 if (config['shard'] < 1 || config['shard'] > config['shards']) {
427 isValid = false; 427 isValid = false;
428 print("Error: shard index is ${config['shard']} out of " + 428 print("Error: shard index is ${config['shard']} out of " +
429 "${config['shards']} shards"); 429 "${config['shards']} shards");
430 } 430 }
431 if (config['runtime'] == 'dartium' && config['compiler'] == 'none' && 431 if (config['runtime'] == 'dartium' && config['compiler'] == 'none' &&
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 return option; 640 return option;
641 } 641 }
642 } 642 }
643 print('Unknown test option $name'); 643 print('Unknown test option $name');
644 exit(1); 644 exit(1);
645 } 645 }
646 646
647 647
648 List<_TestOptionSpecification> _options; 648 List<_TestOptionSpecification> _options;
649 } 649 }
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