OLD | NEW |
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 /** | 5 /** |
6 * Tool for running co19 tests. Used when updating co19. | 6 * Tool for running co19 tests. Used when updating co19. |
7 * | 7 * |
8 * Currently, this tool is merely a convenience around multiple | 8 * Currently, this tool is merely a convenience around multiple |
9 * invocations of test.dart. Long term, we hope to evolve this into a | 9 * invocations of test.dart. Long term, we hope to evolve this into a |
10 * script that can automate most of the tasks necessary when updating | 10 * script that can automate most of the tasks necessary when updating |
11 * co19. | 11 * co19. |
12 * | 12 * |
13 * Usage: | 13 * Usage: |
14 * [: dart tools/testing/dart/co19_test.dart :] | 14 * [: dart tools/testing/dart/co19_test.dart :] |
15 */ | 15 */ |
16 | 16 |
17 library co19_test; | 17 library co19_test; |
18 | 18 |
19 import "dart:io"; | 19 import "dart:io"; |
20 | 20 |
21 import "test_options.dart"; | 21 import "test_options.dart"; |
22 import "test_suite.dart"; | 22 import "test_suite.dart"; |
23 import "test_configurations.dart"; | 23 import "test_configurations.dart"; |
24 | 24 |
25 const List<String> COMMON_ARGUMENTS = | 25 const List<String> COMMON_ARGUMENTS = const <String>[ |
26 const <String>['--report', '--progress=diff', 'co19']; | 26 '--report', |
| 27 '--progress=diff', |
| 28 'co19' |
| 29 ]; |
27 | 30 |
28 const List<List<String>> COMMAND_LINES = const <List<String>>[ | 31 const List<List<String>> COMMAND_LINES = const <List<String>>[ |
29 const <String>['-mrelease,debug', '-rvm', '-cnone'], | 32 const <String>['-mrelease,debug', '-rvm', '-cnone'], |
30 const <String>['-mrelease,debug', '-rvm', '-cnone', '--checked'], | 33 const <String>['-mrelease,debug', '-rvm', '-cnone', '--checked'], |
31 const <String>['-mrelease', '-rnone', '-cdart2analyzer'], | 34 const <String>['-mrelease', '-rnone', '-cdart2analyzer'], |
32 const <String>['-mrelease', '-rd8', '-cdart2js', '--use-sdk'], | 35 const <String>['-mrelease', '-rd8', '-cdart2js', '--use-sdk'], |
33 const <String>['-mrelease', '-rd8,jsshell', '-cdart2js', '--use-sdk', | 36 const <String>[ |
34 '--minified'], | 37 '-mrelease', |
35 const <String>['-mrelease', '-rd8,jsshell', '-cdart2js', '--use-sdk', | 38 '-rd8,jsshell', |
36 '--checked'], | 39 '-cdart2js', |
37 const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk', | 40 '--use-sdk', |
38 '--checked'], | 41 '--minified' |
39 const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk'], | 42 ], |
| 43 const <String>[ |
| 44 '-mrelease', |
| 45 '-rd8,jsshell', |
| 46 '-cdart2js', |
| 47 '--use-sdk', |
| 48 '--checked' |
| 49 ], |
| 50 const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk', '--checked'], |
| 51 const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk'], |
40 ]; | 52 ]; |
41 | 53 |
42 void main(List<String> args) { | 54 void main(List<String> args) { |
43 TestUtils.setDartDirUri(Platform.script.resolve('../../..')); | 55 TestUtils.setDartDirUri(Platform.script.resolve('../../..')); |
44 var optionsParser = new TestOptionsParser(); | 56 var optionsParser = new TestOptionsParser(); |
45 List<Map> configurations = <Map>[]; | 57 List<Map> configurations = <Map>[]; |
46 for (var commandLine in COMMAND_LINES) { | 58 for (var commandLine in COMMAND_LINES) { |
47 List arguments = <String>[]; | 59 List arguments = <String>[]; |
48 arguments.addAll(COMMON_ARGUMENTS); | 60 arguments.addAll(COMMON_ARGUMENTS); |
49 arguments.addAll(args); | 61 arguments.addAll(args); |
50 arguments.addAll(commandLine); | 62 arguments.addAll(commandLine); |
51 configurations.addAll(optionsParser.parse(arguments)); | 63 configurations.addAll(optionsParser.parse(arguments)); |
52 } | 64 } |
53 | 65 |
54 if (configurations != null || configurations.length > 0) { | 66 if (configurations != null || configurations.length > 0) { |
55 testConfigurations(configurations); | 67 testConfigurations(configurations); |
56 } | 68 } |
57 } | 69 } |
58 | |
OLD | NEW |