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

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

Issue 11066014: Revert revision 13230 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « no previous file | 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:math"); 8 #import("dart:math");
9 #import("drt_updater.dart"); 9 #import("drt_updater.dart");
10 #import("test_suite.dart"); 10 #import("test_suite.dart");
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 ['-c', '--compiler'], 81 ['-c', '--compiler'],
82 ['none', 'dart2dart', 'dart2js', 'dartc'], 82 ['none', 'dart2dart', 'dart2js', 'dartc'],
83 'none'), 83 'none'),
84 new _TestOptionSpecification( 84 new _TestOptionSpecification(
85 'runtime', 85 'runtime',
86 '''Where the tests should be run. 86 '''Where the tests should be run.
87 vm: Run Dart code on the standalone dart vm. 87 vm: Run Dart code on the standalone dart vm.
88 88
89 d8: Run JavaScript from the command line using v8. 89 d8: Run JavaScript from the command line using v8.
90 90
91 jsshell: Run JavaScript from the command line using firefox js-shell.
92
93 drt: Run Dart or JavaScript in the headless version of Chrome, 91 drt: Run Dart or JavaScript in the headless version of Chrome,
94 DumpRenderTree. 92 DumpRenderTree.
95 93
96 dartium: Run Dart or JavaScript in Dartium. 94 dartium: Run Dart or JavaScript in Dartium.
97 95
98 [ff | chrome | safari | ie | opera]: Run JavaScript in the specified 96 [ff | chrome | safari | ie | opera]: Run JavaScript in the specified
99 browser. 97 browser.
100 98
101 none: No runtime, compile only (for example, used for dartc static analysis 99 none: No runtime, compile only (for example, used for dartc static analysis
102 tests).''', 100 tests).''',
103 ['-r', '--runtime'], 101 ['-r', '--runtime'],
104 ['vm', 'd8', 'jsshell', 'drt', 'dartium', 'ff', 'firefox', 102 ['vm', 'd8', 'drt', 'dartium', 'ff', 'firefox', 'chrome',
105 'chrome', 'safari', 'ie', 'opera', 'none'], 103 'safari', 'ie', 'opera', 'none'],
106 'vm'), 104 'vm'),
107 new _TestOptionSpecification( 105 new _TestOptionSpecification(
108 'arch', 106 'arch',
109 'The architecture to run tests for', 107 'The architecture to run tests for',
110 ['-a', '--arch'], 108 ['-a', '--arch'],
111 ['all', 'ia32', 'x64', 'simarm'], 109 ['all', 'ia32', 'x64', 'simarm'],
112 'ia32'), 110 'ia32'),
113 new _TestOptionSpecification( 111 new _TestOptionSpecification(
114 'system', 112 'system',
115 'The operating system to run tests on', 113 'The operating system to run tests on',
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 */ 388 */
391 bool _isValidConfig(Map config) { 389 bool _isValidConfig(Map config) {
392 bool isValid = true; 390 bool isValid = true;
393 List<String> validRuntimes; 391 List<String> validRuntimes;
394 switch (config['compiler']) { 392 switch (config['compiler']) {
395 case 'dart2js': 393 case 'dart2js':
396 // Note: by adding 'none' as a configuration, if the user 394 // Note: by adding 'none' as a configuration, if the user
397 // runs test.py -c dart2js -r drt,none the dart2js_none and 395 // runs test.py -c dart2js -r drt,none the dart2js_none and
398 // dart2js_drt will be duplicating work. If later we don't need 'none' 396 // dart2js_drt will be duplicating work. If later we don't need 'none'
399 // with dart2js, we should remove it from here. 397 // with dart2js, we should remove it from here.
400 validRuntimes = const ['d8', 'jsshell', 'drt', 'none', 'dartium', 398 validRuntimes = const ['d8', 'drt', 'none', 'dartium',
401 'ff', 'chrome', 'safari', 'ie', 'opera']; 399 'ff', 'chrome', 'safari', 'ie', 'opera'];
402 break; 400 break;
403 case 'dartc': 401 case 'dartc':
404 validRuntimes = const ['none']; 402 validRuntimes = const ['none'];
405 break; 403 break;
406 case 'none': 404 case 'none':
407 case 'dart2dart': 405 case 'dart2dart':
408 validRuntimes = const ['vm', 'drt', 'dartium']; 406 validRuntimes = const ['vm', 'drt', 'dartium'];
409 break; 407 break;
410 } 408 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // Create the artificial 'unchecked' options that test status files 466 // Create the artificial 'unchecked' options that test status files
469 // expect. 467 // expect.
470 configuration['unchecked'] = !configuration['checked']; 468 configuration['unchecked'] = !configuration['checked'];
471 configuration['host_unchecked'] = !configuration['host_checked']; 469 configuration['host_unchecked'] = !configuration['host_checked'];
472 470
473 String runtime = configuration['runtime']; 471 String runtime = configuration['runtime'];
474 if (runtime == 'firefox') { 472 if (runtime == 'firefox') {
475 configuration['runtime'] == 'ff'; 473 configuration['runtime'] == 'ff';
476 } 474 }
477 475
478 configuration['browser'] = TestUtils.isBrowserRuntime(runtime); 476 if (TestUtils.isBrowserRuntime(runtime)) {
479 477 configuration['browser'] = true;
480 // Set the javascript command line flag for less verbose status files. 478 }
481 configuration['jscl'] = TestUtils.isJsCommandLineRuntime(runtime);
482 479
483 // Expand the test selectors into a suite name and a simple 480 // Expand the test selectors into a suite name and a simple
484 // regular expressions to be used on the full path of a test file 481 // regular expressions to be used on the full path of a test file
485 // in that test suite. If no selectors are explicitly given use 482 // in that test suite. If no selectors are explicitly given use
486 // the default suite patterns. 483 // the default suite patterns.
487 var selectors = configuration['selectors']; 484 var selectors = configuration['selectors'];
488 if (selectors is !Map) { 485 if (selectors is !Map) {
489 if (selectors == null) { 486 if (selectors == null) {
490 selectors = new List.from(defaultTestSelectors); 487 selectors = new List.from(defaultTestSelectors);
491 } 488 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 return option; 642 return option;
646 } 643 }
647 } 644 }
648 print('Unknown test option $name'); 645 print('Unknown test option $name');
649 exit(1); 646 exit(1);
650 } 647 }
651 648
652 649
653 List<_TestOptionSpecification> _options; 650 List<_TestOptionSpecification> _options;
654 } 651 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698