OLD | NEW |
| (Empty) |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | |
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.md file. | |
4 | |
5 library fasta.test.dart2js_test; | |
6 | |
7 import 'package:test_dart/test_configurations.dart' show | |
8 testConfigurations; | |
9 | |
10 import 'package:test_dart/test_options.dart' show | |
11 TestOptionsParser; | |
12 | |
13 import 'package:test_dart/test_suite.dart' show | |
14 TestUtils; | |
15 | |
16 const String arch = "-ax64"; | |
17 | |
18 const String mode = "-mrelease"; | |
19 | |
20 const String processes = "-j16"; | |
21 | |
22 const String dart2jsV8 = "-cdart2js -rd8"; | |
23 | |
24 const String common = | |
25 // --dart2js-batch is ignored unless set in the first configuration. | |
26 "--dart2js-batch --time -pcolor --report --failure-summary"; | |
27 | |
28 main(List<String> arguments) { | |
29 if (arguments.join(" ") != "--run-tests") { | |
30 // Protect against being run from test.dart. | |
31 print("Usage: dart2js_test.dart --run-tests"); | |
32 return; | |
33 } | |
34 TestUtils.setDartDirUri(Uri.base); | |
35 List<String> commandLines = <String>[ | |
36 "--checked dart2js", | |
37 "$dart2jsV8 --exclude-suite=observatory_ui", | |
38 "$dart2jsV8 dart2js_extra dart2js_native", | |
39 ]; | |
40 List<Map> configurations = <Map>[]; | |
41 for (String commandLine in commandLines) { | |
42 List<String> arguments = <String>[arch, mode, processes] | |
43 ..addAll("$common $commandLine".split(" ")); | |
44 TestOptionsParser optionsParser = new TestOptionsParser(); | |
45 configurations.addAll(optionsParser.parse(arguments)); | |
46 } | |
47 testConfigurations(configurations); | |
48 } | |
OLD | NEW |