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

Side by Side Diff: tools/test.dart

Issue 10197008: - Add tests/lib to start testing libraries outside of core. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 /** 6 /**
7 * This file is the entrypoint of the dart test suite. This suite is used 7 * This file is the entrypoint of the dart test suite. This suite is used
8 * to test: 8 * to test:
9 * 9 *
10 * 1. the dart vm 10 * 1. the dart vm
(...skipping 15 matching lines...) Expand all
26 #library("test"); 26 #library("test");
27 27
28 #import("testing/dart/test_runner.dart"); 28 #import("testing/dart/test_runner.dart");
29 #import("testing/dart/test_options.dart"); 29 #import("testing/dart/test_options.dart");
30 #import("testing/dart/test_suite.dart"); 30 #import("testing/dart/test_suite.dart");
31 31
32 #import("../tests/co19/test_config.dart"); 32 #import("../tests/co19/test_config.dart");
33 #import("../tests/corelib/test_config.dart"); 33 #import("../tests/corelib/test_config.dart");
34 #import("../tests/isolate/test_config.dart"); 34 #import("../tests/isolate/test_config.dart");
35 #import("../tests/language/test_config.dart"); 35 #import("../tests/language/test_config.dart");
36 #import("../tests/lib/test_config.dart");
36 #import("../tests/standalone/test_config.dart"); 37 #import("../tests/standalone/test_config.dart");
37 #import("../tests/utils/test_config.dart"); 38 #import("../tests/utils/test_config.dart");
38 #import("../runtime/tests/vm/test_config.dart"); 39 #import("../runtime/tests/vm/test_config.dart");
39 #import("../samples/tests/samples/test_config.dart"); 40 #import("../samples/tests/samples/test_config.dart");
40 #import("../client/tests/dartc/test_config.dart"); 41 #import("../client/tests/dartc/test_config.dart");
41 #import("../compiler/tests/dartc/test_config.dart"); 42 #import("../compiler/tests/dartc/test_config.dart");
42 #import("../client/tests/client/test_config.dart"); 43 #import("../client/tests/client/test_config.dart");
43 #import("../frog/tests/frog/test_config.dart"); 44 #import("../frog/tests/frog/test_config.dart");
44 #import("../frog/tests/leg/test_config.dart"); 45 #import("../frog/tests/leg/test_config.dart");
45 #import("../frog/tests/leg_only/test_config.dart"); 46 #import("../frog/tests/leg_only/test_config.dart");
46 #import("../frog/tests/native/test_config.dart"); 47 #import("../frog/tests/native/test_config.dart");
47 #import("../frog/tests/await/test_config.dart"); 48 #import("../frog/tests/await/test_config.dart");
48 #import("../utils/tests/css/test_config.dart"); 49 #import("../utils/tests/css/test_config.dart");
49 #import("../utils/tests/import_mapper/test_config.dart"); 50 #import("../utils/tests/import_mapper/test_config.dart");
50 51
51 /** 52 /**
52 * The directories that contain test suites which follow the conventions 53 * The directories that contain test suites which follow the conventions
53 * required by [DirectoryTestSuite]. Ideally, we'd move more suites to this 54 * required by [DirectoryTestSuite]. Ideally, we'd move more suites to this
54 * convention because it makes it much simpler to add them to test.dart. (You 55 * convention because it makes it much simpler to add them to test.dart. (You
55 * basically add the directory here and you're done.) 56 * basically add the directory here and you're done.)
56 */ 57 */
57 final TEST_SUITE_DIRECTORIES = const [ 58 final TEST_SUITE_DIRECTORIES = const [
58 'utils/tests/peg', 59 'utils/tests/peg',
59 'utils/tests/pub', 60 'utils/tests/pub',
60 ]; 61 ];
Bill Hesse 2012/04/25 10:19:35 Can you add the directory tests/lib here, to TEST_
61 62
62 main() { 63 main() {
63 var startTime = new Date.now(); 64 var startTime = new Date.now();
64 var optionsParser = new TestOptionsParser(); 65 var optionsParser = new TestOptionsParser();
65 List<Map> configurations = optionsParser.parse(new Options().arguments); 66 List<Map> configurations = optionsParser.parse(new Options().arguments);
66 if (configurations == null || configurations.length == 0) return; 67 if (configurations == null || configurations.length == 0) return;
67 68
68 // Extract global options from first configuration. 69 // Extract global options from first configuration.
69 var firstConf = configurations[0]; 70 var firstConf = configurations[0];
70 Map<String, RegExp> selectors = firstConf['selectors']; 71 Map<String, RegExp> selectors = firstConf['selectors'];
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 105 }
105 if (selectors.containsKey('corelib')) { 106 if (selectors.containsKey('corelib')) {
106 queue.addTestSuite(new CorelibTestSuite(conf)); 107 queue.addTestSuite(new CorelibTestSuite(conf));
107 } 108 }
108 if (selectors.containsKey('co19')) { 109 if (selectors.containsKey('co19')) {
109 queue.addTestSuite(new Co19TestSuite(conf)); 110 queue.addTestSuite(new Co19TestSuite(conf));
110 } 111 }
111 if (selectors.containsKey('language')) { 112 if (selectors.containsKey('language')) {
112 queue.addTestSuite(new LanguageTestSuite(conf)); 113 queue.addTestSuite(new LanguageTestSuite(conf));
113 } 114 }
115 if (selectors.containsKey('lib')) {
116 queue.addTestSuite(new LibTestSuite(conf));
117 }
114 if (selectors.containsKey('isolate')) { 118 if (selectors.containsKey('isolate')) {
115 queue.addTestSuite(new IsolateTestSuite(conf)); 119 queue.addTestSuite(new IsolateTestSuite(conf));
116 } 120 }
117 if (selectors.containsKey('utils')) { 121 if (selectors.containsKey('utils')) {
118 queue.addTestSuite(new UtilsTestSuite(conf)); 122 queue.addTestSuite(new UtilsTestSuite(conf));
119 } 123 }
120 if (conf['runtime'] == 'vm' && selectors.containsKey('vm')) { 124 if (conf['runtime'] == 'vm' && selectors.containsKey('vm')) {
121 queue.addTestSuite(new VMTestSuite(conf)); 125 queue.addTestSuite(new VMTestSuite(conf));
122 queue.addTestSuite(new VMDartTestSuite(conf)); 126 queue.addTestSuite(new VMDartTestSuite(conf));
123 } 127 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Start process queue. 170 // Start process queue.
167 var queue = new ProcessQueue(maxProcesses, 171 var queue = new ProcessQueue(maxProcesses,
168 progressIndicator, 172 progressIndicator,
169 startTime, 173 startTime,
170 printTiming, 174 printTiming,
171 enqueueConfiguration, 175 enqueueConfiguration,
172 verbose, 176 verbose,
173 listTests, 177 listTests,
174 keepGeneratedTests); 178 keepGeneratedTests);
175 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698