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 * This is a helper for run.sh. We try to run all of the Dart code in one | 6 * This is a helper for run.sh. We try to run all of the Dart code in one |
7 * instance of the Dart VM to reduce warm-up time. | 7 * instance of the Dart VM to reduce warm-up time. |
8 */ | 8 */ |
9 library run_impl; | 9 library run_impl; |
10 | 10 |
11 import 'dart:async'; | |
12 import 'dart:io'; | |
13 import 'dart:math' show min; | |
14 import 'dart:utf' show encodeUtf8; | |
15 import 'package:pathos/path.dart' as path; | |
16 import 'package:unittest/compact_vm_config.dart'; | 11 import 'package:unittest/compact_vm_config.dart'; |
17 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
18 import 'package:web_ui/dwc.dart' as dwc; | |
19 import 'package:web_ui/testing/render_test.dart'; | 13 import 'package:web_ui/testing/render_test.dart'; |
20 | 14 |
21 import 'analyzer_test.dart' as analyzer_test; | 15 import 'analyzer_test.dart' as analyzer_test; |
22 import 'css_test.dart' as css_test; | 16 import 'css_test.dart' as css_test; |
23 import 'compiler_test.dart' as compiler_test; | 17 import 'compiler_test.dart' as compiler_test; |
24 import 'emitter_test.dart' as emitter_test; | 18 import 'emitter_test.dart' as emitter_test; |
25 import 'html5_utils_test.dart' as html5_utils_test; | 19 import 'html5_utils_test.dart' as html5_utils_test; |
26 import 'html_cleaner_test.dart' as html_cleaner_test; | 20 import 'html_cleaner_test.dart' as html_cleaner_test; |
27 import 'linked_list_test.dart' as linked_list_test; | 21 import 'linked_list_test.dart' as linked_list_test; |
28 import 'observe_test.dart' as observe_test; | 22 import 'observe_test.dart' as observe_test; |
29 import 'observable_transform_test.dart' as observable_transform_test; | 23 import 'observable_transform_test.dart' as observable_transform_test; |
30 import 'paths_test.dart' as paths_test; | 24 import 'paths_test.dart' as paths_test; |
31 import 'refactor_test.dart' as refactor_test; | 25 import 'refactor_test.dart' as refactor_test; |
32 import 'utils_test.dart' as utils_test; | 26 import 'utils_test.dart' as utils_test; |
33 import 'watcher_test.dart' as watcher_test; | 27 import 'watcher_test.dart' as watcher_test; |
34 | 28 |
35 main() { | 29 main(args) { |
36 var args = new Options().arguments; | |
37 var pattern = new RegExp(args.length > 0 ? args[0] : '.'); | 30 var pattern = new RegExp(args.length > 0 ? args[0] : '.'); |
38 | 31 |
39 useCompactVMConfiguration(); | 32 useCompactVMConfiguration(); |
40 | 33 |
41 void addGroup(testFile, testMain) { | 34 void addGroup(testFile, testMain) { |
42 if (pattern.hasMatch(testFile)) { | 35 if (pattern.hasMatch(testFile)) { |
43 group(testFile.replaceAll('_test.dart', ':'), testMain); | 36 group(testFile.replaceAll('_test.dart', ':'), testMain); |
44 } | 37 } |
45 } | 38 } |
46 | 39 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 arguments: args, pattern: pattern, deleteDir: deleteDirectory); | 94 arguments: args, pattern: pattern, deleteDir: deleteDirectory); |
102 } | 95 } |
103 | 96 |
104 void cssCompileShadowDOMTest(String path, String pattern, | 97 void cssCompileShadowDOMTest(String path, String pattern, |
105 [bool deleteDirectory = true]) { | 98 [bool deleteDirectory = true]) { |
106 var args = ['--no-css']; | 99 var args = ['--no-css']; |
107 renderTests(path, path, '$path/expected', '$path/out', | 100 renderTests(path, path, '$path/expected', '$path/out', |
108 arguments: args, pattern: pattern, | 101 arguments: args, pattern: pattern, |
109 deleteDir: deleteDirectory); | 102 deleteDir: deleteDirectory); |
110 } | 103 } |
OLD | NEW |