Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: pkg/polymer/test/run_all.dart

Issue 23452010: Add a polymer validator: a linter/analysis that will replace the old (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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:io'; 11 import 'dart:io';
12 import 'package:unittest/compact_vm_config.dart'; 12 import 'package:unittest/compact_vm_config.dart';
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 import 'package:polymer/testing/content_shell_test.dart'; 14 import 'package:polymer/testing/content_shell_test.dart';
15 15
16 import 'compiler_test.dart' as compiler_test;
16 import 'css_test.dart' as css_test; 17 import 'css_test.dart' as css_test;
17 import 'compiler_test.dart' as compiler_test;
18 import 'utils_test.dart' as utils_test;
19 import 'transform/all_phases_test.dart' as all_phases_test; 18 import 'transform/all_phases_test.dart' as all_phases_test;
20 import 'transform/code_extractor_test.dart' as code_extractor_test; 19 import 'transform/code_extractor_test.dart' as code_extractor_test;
21 import 'transform/import_inliner_test.dart' as import_inliner_test; 20 import 'transform/import_inliner_test.dart' as import_inliner_test;
22 import 'transform/polyfill_injector_test.dart' as polyfill_injector_test; 21 import 'transform/polyfill_injector_test.dart' as polyfill_injector_test;
23 import 'transform/script_compactor_test.dart' as script_compactor_test; 22 import 'transform/script_compactor_test.dart' as script_compactor_test;
23 import 'utils_test.dart' as utils_test;
24 import 'validator_test.dart' as validator_test;
24 25
25 main() { 26 main() {
26 var args = new Options().arguments; 27 var args = new Options().arguments;
27 var pattern = new RegExp(args.length > 0 ? args[0] : '.'); 28 var pattern = new RegExp(args.length > 0 ? args[0] : '.');
28 29
29 useCompactVMConfiguration(); 30 useCompactVMConfiguration();
30 31
31 void addGroup(testFile, testMain) { 32 void addGroup(testFile, testMain) {
32 if (pattern.hasMatch(testFile)) { 33 if (pattern.hasMatch(testFile)) {
33 group(testFile.replaceAll('_test.dart', ':'), testMain); 34 group(testFile.replaceAll('_test.dart', ':'), testMain);
34 } 35 }
35 } 36 }
36 37
38 addGroup('validator_test.dart', validator_test.main);
37 addGroup('compiler_test.dart', compiler_test.main); 39 addGroup('compiler_test.dart', compiler_test.main);
38 addGroup('css_test.dart', css_test.main); 40 addGroup('css_test.dart', css_test.main);
39 addGroup('utils_test.dart', utils_test.main); 41 addGroup('utils_test.dart', utils_test.main);
40 addGroup('transform/code_extractor_test.dart', code_extractor_test.main); 42 addGroup('transform/code_extractor_test.dart', code_extractor_test.main);
41 addGroup('transform/import_inliner_test.dart', import_inliner_test.main); 43 addGroup('transform/import_inliner_test.dart', import_inliner_test.main);
42 addGroup('transform/script_compactor_test.dart', script_compactor_test.main); 44 addGroup('transform/script_compactor_test.dart', script_compactor_test.main);
43 addGroup('transform/polyfill_injector_test.dart', 45 addGroup('transform/polyfill_injector_test.dart',
44 polyfill_injector_test.main); 46 polyfill_injector_test.main);
45 addGroup('transform/all_phases_test.dart', all_phases_test.main); 47 addGroup('transform/all_phases_test.dart', all_phases_test.main);
46 48
(...skipping 10 matching lines...) Expand all
57 void exampleTest(String path, [List args]) { 59 void exampleTest(String path, [List args]) {
58 // TODO(sigmund): renderTests currently contatenates [path] with the out 60 // TODO(sigmund): renderTests currently contatenates [path] with the out
59 // folder. This can be a problem with relative paths that go up (like todomvc 61 // folder. This can be a problem with relative paths that go up (like todomvc
60 // above, which has '../../../'). If we continue running tests with 62 // above, which has '../../../'). If we continue running tests with
61 // test/run.sh, we should fix this. For now we work around this problem by 63 // test/run.sh, we should fix this. For now we work around this problem by
62 // using a long path 'data/out/example/test'. That way we avoid dumping output 64 // using a long path 'data/out/example/test'. That way we avoid dumping output
63 // in the source-tree. 65 // in the source-tree.
64 renderTests(path, '$path/test', '$path/test/expected', 66 renderTests(path, '$path/test', '$path/test/expected',
65 'data/out/example/test', arguments: args); 67 'data/out/example/test', arguments: args);
66 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698