| OLD | NEW |
| 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 "drt_updater.dart"; | 8 import "drt_updater.dart"; |
| 9 import "test_suite.dart"; | 9 import "test_suite.dart"; |
| 10 import "path.dart"; | 10 import "path.dart"; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 dart2js: Compile dart code to JavaScript by running dart2js. | 67 dart2js: Compile dart code to JavaScript by running dart2js. |
| 68 (only valid with the following runtimes: d8, drt, chrome, | 68 (only valid with the following runtimes: d8, drt, chrome, |
| 69 safari, ie9, ie10, ie11, firefox, opera, chromeOnAndroid, | 69 safari, ie9, ie10, ie11, firefox, opera, chromeOnAndroid, |
| 70 none (compile only)), | 70 none (compile only)), |
| 71 | 71 |
| 72 dart2analyzer: Perform static analysis on Dart code by running the analyzer | 72 dart2analyzer: Perform static analysis on Dart code by running the analyzer |
| 73 (only valid with the following runtimes: none) | 73 (only valid with the following runtimes: none) |
| 74 | 74 |
| 75 dart2app: Compile the Dart code into an app snapshot before running the test | 75 dart2app: Compile the Dart code into an app snapshot before running the test |
| 76 (only valid with the following runtimes: dart_product)''', | 76 (only valid with the following runtimes: dart_app)''', |
| 77 ['-c', '--compiler'], | 77 ['-c', '--compiler'], |
| 78 ['none', 'precompiler', 'dart2js', 'dart2analyzer', 'dart2app'], | 78 ['none', 'precompiler', 'dart2js', 'dart2analyzer', 'dart2app', 'dart2
appjit'], |
| 79 'none'), | 79 'none'), |
| 80 // TODO(antonm): fix the option drt. | 80 // TODO(antonm): fix the option drt. |
| 81 new _TestOptionSpecification( | 81 new _TestOptionSpecification( |
| 82 'runtime', | 82 'runtime', |
| 83 '''Where the tests should be run. | 83 '''Where the tests should be run. |
| 84 vm: Run Dart code on the standalone dart vm. | 84 vm: Run Dart code on the standalone dart vm. |
| 85 | 85 |
| 86 dart_precompiled: Run a precompiled snapshot on a variant of the standalone | 86 dart_precompiled: Run a precompiled snapshot on a variant of the standalone |
| 87 dart vm lacking a JIT. | 87 dart vm lacking a JIT. |
| 88 | 88 |
| 89 dart_product: Run a full app snapshot in product mode. | 89 dart_app: Run a full app snapshot, with or without cached unoptimized code. |
| 90 | 90 |
| 91 d8: Run JavaScript from the command line using v8. | 91 d8: Run JavaScript from the command line using v8. |
| 92 | 92 |
| 93 jsshell: Run JavaScript from the command line using firefox js-shell. | 93 jsshell: Run JavaScript from the command line using firefox js-shell. |
| 94 | 94 |
| 95 drt: Run Dart or JavaScript in the headless version of Chrome, | 95 drt: Run Dart or JavaScript in the headless version of Chrome, |
| 96 Content shell. | 96 Content shell. |
| 97 | 97 |
| 98 dartium: Run Dart or JavaScript in Dartium. | 98 dartium: Run Dart or JavaScript in Dartium. |
| 99 | 99 |
| 100 ContentShellOnAndroid: Run Dart or JavaScript in Dartium content shell | 100 ContentShellOnAndroid: Run Dart or JavaScript in Dartium content shell |
| 101 on Android. | 101 on Android. |
| 102 | 102 |
| 103 DartiumOnAndroid: Run Dart or Javascript in Dartium on Android. | 103 DartiumOnAndroid: Run Dart or Javascript in Dartium on Android. |
| 104 | 104 |
| 105 [ff | chrome | safari | ie9 | ie10 | ie11 | opera | chromeOnAndroid]: | 105 [ff | chrome | safari | ie9 | ie10 | ie11 | opera | chromeOnAndroid]: |
| 106 Run JavaScript in the specified browser. | 106 Run JavaScript in the specified browser. |
| 107 | 107 |
| 108 none: No runtime, compile only (for example, used for dart2analyzer static | 108 none: No runtime, compile only (for example, used for dart2analyzer static |
| 109 analysis tests).''', | 109 analysis tests).''', |
| 110 ['-r', '--runtime'], | 110 ['-r', '--runtime'], |
| 111 [ | 111 [ |
| 112 'vm', | 112 'vm', |
| 113 'dart_precompiled', | 113 'dart_precompiled', |
| 114 'dart_product', | 114 'dart_app', |
| 115 'd8', | 115 'd8', |
| 116 'jsshell', | 116 'jsshell', |
| 117 'drt', | 117 'drt', |
| 118 'dartium', | 118 'dartium', |
| 119 'ff', | 119 'ff', |
| 120 'firefox', | 120 'firefox', |
| 121 'chrome', | 121 'chrome', |
| 122 'safari', | 122 'safari', |
| 123 'ie9', | 123 'ie9', |
| 124 'ie10', | 124 'ie10', |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 'ie11', | 638 'ie11', |
| 639 'opera', | 639 'opera', |
| 640 'chromeOnAndroid', | 640 'chromeOnAndroid', |
| 641 'safarimobilesim' | 641 'safarimobilesim' |
| 642 ]; | 642 ]; |
| 643 break; | 643 break; |
| 644 case 'dart2analyzer': | 644 case 'dart2analyzer': |
| 645 validRuntimes = const ['none']; | 645 validRuntimes = const ['none']; |
| 646 break; | 646 break; |
| 647 case 'dart2app': | 647 case 'dart2app': |
| 648 validRuntimes = const ['dart_product']; | 648 validRuntimes = const ['dart_app']; |
| 649 break; |
| 650 case 'dart2appjit': |
| 651 validRuntimes = const ['dart_app']; |
| 649 break; | 652 break; |
| 650 case 'precompiler': | 653 case 'precompiler': |
| 651 validRuntimes = const ['dart_precompiled']; | 654 validRuntimes = const ['dart_precompiled']; |
| 652 break; | 655 break; |
| 653 case 'none': | 656 case 'none': |
| 654 validRuntimes = const [ | 657 validRuntimes = const [ |
| 655 'vm', | 658 'vm', |
| 656 'drt', | 659 'drt', |
| 657 'dartium', | 660 'dartium', |
| 658 'ContentShellOnAndroid', | 661 'ContentShellOnAndroid', |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 if (option.keys.contains(name)) { | 897 if (option.keys.contains(name)) { |
| 895 return option; | 898 return option; |
| 896 } | 899 } |
| 897 } | 900 } |
| 898 print('Unknown test option $name'); | 901 print('Unknown test option $name'); |
| 899 exit(1); | 902 exit(1); |
| 900 } | 903 } |
| 901 | 904 |
| 902 List<_TestOptionSpecification> _options; | 905 List<_TestOptionSpecification> _options; |
| 903 } | 906 } |
| OLD | NEW |