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 import 'dart:io'; |
18 | 18 |
19 import "dart:io"; | 19 import 'configuration.dart'; |
20 | 20 import 'options.dart'; |
21 import "options.dart"; | 21 import 'test_suite.dart'; |
22 import "test_suite.dart"; | 22 import 'test_configurations.dart'; |
23 import "test_configurations.dart"; | |
24 | 23 |
25 const List<String> COMMON_ARGUMENTS = const <String>[ | 24 const List<String> COMMON_ARGUMENTS = const <String>[ |
26 '--report', | 25 '--report', |
27 '--progress=diff', | 26 '--progress=diff', |
28 'co19' | 27 'co19' |
29 ]; | 28 ]; |
30 | 29 |
31 const List<List<String>> COMMAND_LINES = const <List<String>>[ | 30 const List<List<String>> COMMAND_LINES = const <List<String>>[ |
32 const <String>['-mrelease,debug', '-rvm', '-cnone'], | 31 const <String>['-mrelease,debug', '-rvm', '-cnone'], |
33 const <String>['-mrelease,debug', '-rvm', '-cnone', '--checked'], | 32 const <String>['-mrelease,debug', '-rvm', '-cnone', '--checked'], |
(...skipping 19 matching lines...) Expand all Loading... |
53 '-cnone', | 52 '-cnone', |
54 '--use-sdk', | 53 '--use-sdk', |
55 '--fast-startup' | 54 '--fast-startup' |
56 ], | 55 ], |
57 const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk'], | 56 const <String>['-mrelease', '-rdartium', '-cnone', '--use-sdk'], |
58 ]; | 57 ]; |
59 | 58 |
60 void main(List<String> args) { | 59 void main(List<String> args) { |
61 TestUtils.setDartDirUri(Platform.script.resolve('../../..')); | 60 TestUtils.setDartDirUri(Platform.script.resolve('../../..')); |
62 var optionsParser = new OptionsParser(); | 61 var optionsParser = new OptionsParser(); |
63 var configurations = <Map<String, dynamic>>[]; | 62 var configurations = <Configuration>[]; |
64 for (var commandLine in COMMAND_LINES) { | 63 for (var commandLine in COMMAND_LINES) { |
65 var arguments = <String>[]; | 64 var arguments = <String>[]; |
66 arguments.addAll(COMMON_ARGUMENTS); | 65 arguments.addAll(COMMON_ARGUMENTS); |
67 arguments.addAll(args); | 66 arguments.addAll(args); |
68 arguments.addAll(commandLine); | 67 arguments.addAll(commandLine); |
69 configurations.addAll(optionsParser.parse(arguments)); | 68 configurations.addAll(optionsParser.parse(arguments)); |
70 } | 69 } |
71 | 70 |
72 if (configurations != null || configurations.length > 0) { | 71 if (configurations != null || configurations.length > 0) { |
73 testConfigurations(configurations); | 72 testConfigurations(configurations); |
74 } | 73 } |
75 } | 74 } |
OLD | NEW |