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

Side by Side Diff: tools/test.dart

Issue 49043003: Run all tests inside an iframe + restrict number of chrome browser processes on mac (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, 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
11 * 2. the dart2js compiler 11 * 2. the dart2js compiler
12 * 3. the static analyzer 12 * 3. the static analyzer
13 * 4. the dart core library 13 * 4. the dart core library
14 * 5. other standard dart libraries (DOM bindings, ui libraries, 14 * 5. other standard dart libraries (DOM bindings, ui libraries,
15 * io libraries etc.) 15 * io libraries etc.)
16 * 16 *
17 * This script is normally invoked by test.py. (test.py finds the dart vm 17 * This script is normally invoked by test.py. (test.py finds the dart vm
18 * and passses along all command line arguments to this script.) 18 * and passses along all command line arguments to this script.)
19 * 19 *
20 * The command line args of this script are documented in 20 * The command line args of this script are documented in
21 * "tools/testing/test_options.dart". 21 * "tools/testing/test_options.dart".
22 * 22 *
23 */ 23 */
24 24
25 library test; 25 library test;
26 26
27 import "dart:async"; 27 import "dart:async";
28 import "dart:io"; 28 import "dart:io";
29 import "dart:math" as math;
29 import "testing/dart/browser_controller.dart"; 30 import "testing/dart/browser_controller.dart";
30 import "testing/dart/http_server.dart"; 31 import "testing/dart/http_server.dart";
31 import "testing/dart/test_options.dart"; 32 import "testing/dart/test_options.dart";
32 import "testing/dart/test_progress.dart"; 33 import "testing/dart/test_progress.dart";
33 import "testing/dart/test_runner.dart"; 34 import "testing/dart/test_runner.dart";
34 import "testing/dart/test_suite.dart"; 35 import "testing/dart/test_suite.dart";
35 import "testing/dart/utils.dart"; 36 import "testing/dart/utils.dart";
36 37
37 import "../runtime/tests/vm/test_config.dart"; 38 import "../runtime/tests/vm/test_config.dart";
38 import "../tests/co19/test_config.dart"; 39 import "../tests/co19/test_config.dart";
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // is that windows does not handle the IE processes independently. 163 // is that windows does not handle the IE processes independently.
163 // If we have more than one browser and kill a browser we are seeing 164 // If we have more than one browser and kill a browser we are seeing
164 // issues with starting up a new browser just after killing the hanging 165 // issues with starting up a new browser just after killing the hanging
165 // browser. 166 // browser.
166 maxBrowserProcesses = 1; 167 maxBrowserProcesses = 1;
167 } else if (conf['runtime'].startsWith('safari') && 168 } else if (conf['runtime'].startsWith('safari') &&
168 conf['use_browser_controller']) { 169 conf['use_browser_controller']) {
169 // Safari does not allow us to run from a fresh profile, so we can only 170 // Safari does not allow us to run from a fresh profile, so we can only
170 // use one browser. 171 // use one browser.
171 maxBrowserProcesses = 1; 172 maxBrowserProcesses = 1;
173 } else if (conf['runtime'] == 'chrome' &&
174 conf['use_browser_controller'] &&
175 Platform.operatingSystem == 'macos') {
176 // Chrome on mac results in random timeouts.
177 maxBrowserProcesses = math.max(1, maxBrowserProcesses ~/ 2);
172 } 178 }
173 179
174 for (String key in selectors.keys) { 180 for (String key in selectors.keys) {
175 if (key == 'co19') { 181 if (key == 'co19') {
176 testSuites.add(new Co19TestSuite(conf)); 182 testSuites.add(new Co19TestSuite(conf));
177 } else if (conf['runtime'] == 'vm' && key == 'vm') { 183 } else if (conf['runtime'] == 'vm' && key == 'vm') {
178 // vm tests contain both cc tests (added here) and dart tests (added 184 // vm tests contain both cc tests (added here) and dart tests (added
179 // in [TEST_SUITE_DIRECTORIES]). 185 // in [TEST_SUITE_DIRECTORIES]).
180 testSuites.add(new VMTestSuite(conf)); 186 testSuites.add(new VMTestSuite(conf));
181 } else if (conf['analyzer']) { 187 } else if (conf['analyzer']) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 void main() { 287 void main() {
282 deleteTemporaryDartDirectories().then((_) { 288 deleteTemporaryDartDirectories().then((_) {
283 var optionsParser = new TestOptionsParser(); 289 var optionsParser = new TestOptionsParser();
284 var configurations = optionsParser.parse(new Options().arguments); 290 var configurations = optionsParser.parse(new Options().arguments);
285 if (configurations != null && configurations.length > 0) { 291 if (configurations != null && configurations.length > 0) {
286 testConfigurations(configurations); 292 testConfigurations(configurations);
287 } 293 }
288 }); 294 });
289 } 295 }
290 296
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/browser_controller.dart » ('j') | tools/testing/dart/browser_controller.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698