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

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

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

Powered by Google App Engine
This is Rietveld 408576698