| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 */ | 56 */ |
| 57 TestOptionsParser() { | 57 TestOptionsParser() { |
| 58 _options = [ | 58 _options = [ |
| 59 new _TestOptionSpecification('mode', 'Mode in which to run the tests', | 59 new _TestOptionSpecification('mode', 'Mode in which to run the tests', |
| 60 ['-m', '--mode'], ['all', 'debug', 'release', 'product'], 'debug'), | 60 ['-m', '--mode'], ['all', 'debug', 'release', 'product'], 'debug'), |
| 61 new _TestOptionSpecification( | 61 new _TestOptionSpecification( |
| 62 'compiler', | 62 'compiler', |
| 63 '''Specify any compilation step (if needed). | 63 '''Specify any compilation step (if needed). |
| 64 | 64 |
| 65 none: Do not compile the Dart code (run native Dart code on the VM). | 65 none: Do not compile the Dart code (run native Dart code on the VM). |
| 66 (only valid with the following runtimes: vm, flutter, drt) | 66 (only valid with the following runtimes: vm, flutter, drt) |
| 67 |
| 68 precompiler: Compile into AOT snapshot before running the test. |
| 69 (only valid with the dart_precompiled runtime) |
| 67 | 70 |
| 68 dart2js: Compile dart code to JavaScript by running dart2js. | 71 dart2js: Compile dart code to JavaScript by running dart2js. |
| 69 (only valid with the following runtimes: d8, drt, chrome, | 72 (only valid with the following runtimes: d8, drt, chrome, |
| 70 safari, ie9, ie10, ie11, firefox, opera, chromeOnAndroid, | 73 safari, ie9, ie10, ie11, firefox, opera, chromeOnAndroid, |
| 71 none (compile only)), | 74 none (compile only)), |
| 72 | 75 |
| 73 dart2analyzer: Perform static analysis on Dart code by running the analyzer | 76 dart2analyzer: Perform static analysis on Dart code by running the analyzer |
| 74 (only valid with the following runtimes: none) | 77 (only valid with the following runtimes: none) |
| 75 | 78 |
| 76 dart2app: | 79 app_jit: Compile the Dart code into an app snapshot before running test |
| 77 dart2appjit: Compile the Dart code into an app snapshot before running test | |
| 78 (only valid with dart_app runtime) | 80 (only valid with dart_app runtime) |
| 79 | 81 |
| 80 dartk: Compile the Dart source into Kernel before running test. | 82 dartk: Compile the Dart source into Kernel before running test. |
| 81 | 83 |
| 82 dartkp: Compiler the Dart source into Kernel and then Kernel into AOT | 84 dartkp: Compiler the Dart source into Kernel and then Kernel into AOT |
| 83 snapshot before running the test.''', | 85 snapshot before running the test. |
| 86 (only valid with the dart_precompiled runtime) |
| 87 ''', |
| 84 ['-c', '--compiler'], | 88 ['-c', '--compiler'], |
| 85 [ | 89 [ |
| 86 'none', | 90 'none', |
| 87 'precompiler', | 91 'precompiler', |
| 88 'dart2js', | 92 'dart2js', |
| 89 'dart2analyzer', | 93 'dart2analyzer', |
| 90 'app_jit', | 94 'app_jit', |
| 91 'dartk', | 95 'dartk', |
| 92 'dartkp' | 96 'dartkp' |
| 93 ], | 97 ], |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 return option; | 1004 return option; |
| 1001 } | 1005 } |
| 1002 } | 1006 } |
| 1003 print('Unknown test option $name'); | 1007 print('Unknown test option $name'); |
| 1004 exit(1); | 1008 exit(1); |
| 1005 return null; // Unreachable. | 1009 return null; // Unreachable. |
| 1006 } | 1010 } |
| 1007 | 1011 |
| 1008 List<_TestOptionSpecification> _options; | 1012 List<_TestOptionSpecification> _options; |
| 1009 } | 1013 } |
| OLD | NEW |