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

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

Issue 16357010: Basic dart^2 analyzer tests running. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 (only valid with the following runtimes: vm, drt) 73 (only valid with the following runtimes: vm, drt)
74 74
75 dart2js: Compile dart code to JavaScript by running dart2js. 75 dart2js: Compile dart code to JavaScript by running dart2js.
76 (only valid with the following runtimes: d8, drt, chrome, 76 (only valid with the following runtimes: d8, drt, chrome,
77 safari, ie9, ie10, firefox, opera, chromeOnAndroid, 77 safari, ie9, ie10, firefox, opera, chromeOnAndroid,
78 none (compile only)), 78 none (compile only)),
79 79
80 dartc: Perform static analysis on Dart code by running dartc. 80 dartc: Perform static analysis on Dart code by running dartc.
81 (only valid with the following runtimes: none), 81 (only valid with the following runtimes: none),
82 82
83 dartanalyzer: Perform static analysis on Dart code by running the analyzer. 83 dartanalyzer: Perform static analysis on Dart code by running the analyzer on Java.
84 dart2analyzer: Perform static analysis on Dart code by running the analyzer o n Dart.
84 (only valid with the following runtimes: none)''', 85 (only valid with the following runtimes: none)''',
85 ['-c', '--compiler'], 86 ['-c', '--compiler'],
86 ['none', 'dart2dart', 'dart2js', 'dartc', 'dartanalyzer'], 87 ['none', 'dart2dart', 'dart2js', 'dartc', 'dartanalyzer', 'dart2an alyzer'],
87 'none'), 88 'none'),
88 // TODO(antonm): fix the option drt. 89 // TODO(antonm): fix the option drt.
89 new _TestOptionSpecification( 90 new _TestOptionSpecification(
90 'runtime', 91 'runtime',
91 '''Where the tests should be run. 92 '''Where the tests should be run.
92 vm: Run Dart code on the standalone dart vm. 93 vm: Run Dart code on the standalone dart vm.
93 94
94 d8: Run JavaScript from the command line using v8. 95 d8: Run JavaScript from the command line using v8.
95 96
96 jsshell: Run JavaScript from the command line using firefox js-shell. 97 jsshell: Run JavaScript from the command line using firefox js-shell.
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // Note: by adding 'none' as a configuration, if the user 469 // Note: by adding 'none' as a configuration, if the user
469 // runs test.py -c dart2js -r drt,none the dart2js_none and 470 // runs test.py -c dart2js -r drt,none the dart2js_none and
470 // dart2js_drt will be duplicating work. If later we don't need 'none' 471 // dart2js_drt will be duplicating work. If later we don't need 'none'
471 // with dart2js, we should remove it from here. 472 // with dart2js, we should remove it from here.
472 validRuntimes = const ['d8', 'jsshell', 'drt', 'none', 'dartium', 473 validRuntimes = const ['d8', 'jsshell', 'drt', 'none', 'dartium',
473 'ff', 'chrome', 'safari', 'ie9', 'ie10', 474 'ff', 'chrome', 'safari', 'ie9', 'ie10',
474 'opera', 'chromeOnAndroid']; 475 'opera', 'chromeOnAndroid'];
475 break; 476 break;
476 case 'dartc': 477 case 'dartc':
477 case 'dartanalyzer': 478 case 'dartanalyzer':
479 case 'dart2analyzer':
478 validRuntimes = const ['none']; 480 validRuntimes = const ['none'];
479 break; 481 break;
480 case 'none': 482 case 'none':
481 case 'dart2dart': 483 case 'dart2dart':
482 validRuntimes = const ['vm', 'drt', 'dartium']; 484 validRuntimes = const ['vm', 'drt', 'dartium'];
483 break; 485 break;
484 } 486 }
485 if (!validRuntimes.contains(config['runtime'])) { 487 if (!validRuntimes.contains(config['runtime'])) {
486 isValid = false; 488 isValid = false;
487 print("Warning: combination of compiler '${config['compiler']}' and " 489 print("Warning: combination of compiler '${config['compiler']}' and "
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 updater.update(); 619 updater.update();
618 } 620 }
619 } 621 }
620 622
621 // Adjust default timeout based on mode, compiler, and sometimes runtime. 623 // Adjust default timeout based on mode, compiler, and sometimes runtime.
622 if (configuration['timeout'] == -1) { 624 if (configuration['timeout'] == -1) {
623 var timeout = 60; 625 var timeout = 60;
624 switch (configuration['compiler']) { 626 switch (configuration['compiler']) {
625 case 'dartc': 627 case 'dartc':
626 case 'dartanalyzer': 628 case 'dartanalyzer':
629 case 'dart2analyzer':
627 timeout *= 4; 630 timeout *= 4;
628 break; 631 break;
629 case 'dart2js': 632 case 'dart2js':
630 // TODO(ahe): Restore the timeout of 30 seconds when dart2js 633 // TODO(ahe): Restore the timeout of 30 seconds when dart2js
631 // compile-time performance has improved. 634 // compile-time performance has improved.
632 timeout = 60; 635 timeout = 60;
633 if (configuration['mode'] == 'debug') { 636 if (configuration['mode'] == 'debug') {
634 timeout *= 8; 637 timeout *= 8;
635 } 638 }
636 if (configuration['host_checked']) { 639 if (configuration['host_checked']) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 return option; 726 return option;
724 } 727 }
725 } 728 }
726 print('Unknown test option $name'); 729 print('Unknown test option $name');
727 exit(1); 730 exit(1);
728 } 731 }
729 732
730 733
731 List<_TestOptionSpecification> _options; 734 List<_TestOptionSpecification> _options;
732 } 735 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698