| 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 "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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 jsshell: Run JavaScript from the command line using firefox js-shell. | 82 jsshell: Run JavaScript from the command line using firefox js-shell. |
| 83 | 83 |
| 84 drt: Run Dart or JavaScript in the headless version of Chrome, | 84 drt: Run Dart or JavaScript in the headless version of Chrome, |
| 85 Content shell. | 85 Content shell. |
| 86 | 86 |
| 87 dartium: Run Dart or JavaScript in Dartium. | 87 dartium: Run Dart or JavaScript in Dartium. |
| 88 | 88 |
| 89 ContentShellOnAndroid: Run Dart or JavaScript in Dartium content shell | 89 ContentShellOnAndroid: Run Dart or JavaScript in Dartium content shell |
| 90 on Android. | 90 on Android. |
| 91 | 91 |
| 92 DartiumOnAndroid: Run Dart or Javascript in Dartium on Android. |
| 93 |
| 92 [ff | chrome | safari | ie9 | ie10 | opera | chromeOnAndroid]: | 94 [ff | chrome | safari | ie9 | ie10 | opera | chromeOnAndroid]: |
| 93 Run JavaScript in the specified browser. | 95 Run JavaScript in the specified browser. |
| 94 | 96 |
| 95 none: No runtime, compile only (for example, used for dartanalyzer static | 97 none: No runtime, compile only (for example, used for dartanalyzer static |
| 96 analysis tests).''', | 98 analysis tests).''', |
| 97 ['-r', '--runtime'], | 99 ['-r', '--runtime'], |
| 98 ['vm', 'd8', 'jsshell', 'drt', 'dartium', 'ff', 'firefox', | 100 ['vm', 'd8', 'jsshell', 'drt', 'dartium', 'ff', 'firefox', |
| 99 'chrome', 'safari', 'ie9', 'ie10', 'opera', 'chromeOnAndroid', | 101 'chrome', 'safari', 'ie9', 'ie10', 'opera', 'chromeOnAndroid', |
| 100 'ContentShellOnAndroid', 'none'], | 102 'ContentShellOnAndroid', 'DartiumOnAndroid', 'none'], |
| 101 'vm'), | 103 'vm'), |
| 102 new _TestOptionSpecification( | 104 new _TestOptionSpecification( |
| 103 'arch', | 105 'arch', |
| 104 'The architecture to run tests for', | 106 'The architecture to run tests for', |
| 105 ['-a', '--arch'], | 107 ['-a', '--arch'], |
| 106 ['all', 'ia32', 'x64', 'simarm', 'simmips', 'arm', 'mips'], | 108 ['all', 'ia32', 'x64', 'simarm', 'simmips', 'arm', 'mips'], |
| 107 'ia32'), | 109 'ia32'), |
| 108 new _TestOptionSpecification( | 110 new _TestOptionSpecification( |
| 109 'system', | 111 'system', |
| 110 'The operating system to run tests on', | 112 'The operating system to run tests on', |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 validRuntimes = const ['d8', 'jsshell', 'drt', 'none', 'dartium', | 539 validRuntimes = const ['d8', 'jsshell', 'drt', 'none', 'dartium', |
| 538 'ff', 'chrome', 'safari', 'ie9', 'ie10', | 540 'ff', 'chrome', 'safari', 'ie9', 'ie10', |
| 539 'opera', 'chromeOnAndroid']; | 541 'opera', 'chromeOnAndroid']; |
| 540 break; | 542 break; |
| 541 case 'dartanalyzer': | 543 case 'dartanalyzer': |
| 542 case 'dart2analyzer': | 544 case 'dart2analyzer': |
| 543 validRuntimes = const ['none']; | 545 validRuntimes = const ['none']; |
| 544 break; | 546 break; |
| 545 case 'none': | 547 case 'none': |
| 546 case 'dart2dart': | 548 case 'dart2dart': |
| 547 validRuntimes = const ['vm', 'drt', 'dartium', 'ContentShellOnAndroid']; | 549 validRuntimes = const ['vm', 'drt', 'dartium', |
| 550 'ContentShellOnAndroid', 'DartiumOnAndroid']; |
| 548 break; | 551 break; |
| 549 } | 552 } |
| 550 if (!validRuntimes.contains(config['runtime'])) { | 553 if (!validRuntimes.contains(config['runtime'])) { |
| 551 isValid = false; | 554 isValid = false; |
| 552 print("Warning: combination of compiler '${config['compiler']}' and " | 555 print("Warning: combination of compiler '${config['compiler']}' and " |
| 553 "runtime '${config['runtime']}' is invalid. " | 556 "runtime '${config['runtime']}' is invalid. " |
| 554 "Skipping this combination."); | 557 "Skipping this combination."); |
| 555 } | 558 } |
| 556 if ((config['runtime'] == 'ie9' || config['runtime'] == 'ie10') && | 559 if ((config['runtime'] == 'ie9' || config['runtime'] == 'ie10') && |
| 557 Platform.operatingSystem != 'windows') { | 560 Platform.operatingSystem != 'windows') { |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 return option; | 780 return option; |
| 778 } | 781 } |
| 779 } | 782 } |
| 780 print('Unknown test option $name'); | 783 print('Unknown test option $name'); |
| 781 exit(1); | 784 exit(1); |
| 782 } | 785 } |
| 783 | 786 |
| 784 | 787 |
| 785 List<_TestOptionSpecification> _options; | 788 List<_TestOptionSpecification> _options; |
| 786 } | 789 } |
| OLD | NEW |