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

Side by Side Diff: tools/test.dart

Issue 17489002: Add safari cache clearing browser functionality to the safari browser. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | tools/testing/dart/browser_controller.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dartc static analyzer 12 * 3. the dartc 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 "dart:math" as math;
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/record_and_replay.dart"; 32 import "testing/dart/record_and_replay.dart";
32 import "testing/dart/test_options.dart"; 33 import "testing/dart/test_options.dart";
33 import "testing/dart/test_progress.dart"; 34 import "testing/dart/test_progress.dart";
34 import "testing/dart/test_runner.dart"; 35 import "testing/dart/test_runner.dart";
35 import "testing/dart/test_suite.dart"; 36 import "testing/dart/test_suite.dart";
36 import "testing/dart/utils.dart"; 37 import "testing/dart/utils.dart";
37 38
38 import "../compiler/tests/dartc/test_config.dart"; 39 import "../compiler/tests/dartc/test_config.dart";
39 import "../runtime/tests/vm/test_config.dart"; 40 import "../runtime/tests/vm/test_config.dart";
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // anymore. 86 // anymore.
86 var failureSummary = firstConf['failure-summary']; 87 var failureSummary = firstConf['failure-summary'];
87 BuildbotProgressIndicator.stepName = firstConf['step_name']; 88 BuildbotProgressIndicator.stepName = firstConf['step_name'];
88 var verbose = firstConf['verbose']; 89 var verbose = firstConf['verbose'];
89 var printTiming = firstConf['time']; 90 var printTiming = firstConf['time'];
90 var listTests = firstConf['list']; 91 var listTests = firstConf['list'];
91 92
92 var recordingPath = firstConf['record_to_file']; 93 var recordingPath = firstConf['record_to_file'];
93 var recordingOutputPath = firstConf['replay_from_file']; 94 var recordingOutputPath = firstConf['replay_from_file'];
94 95
96 // We set a special flag in the safari browser if we need to clear out
97 // the cache before running.
98 Safari.deleteCache = firstConf['clear_safari_cache'];
99
95 if (recordingPath != null && recordingOutputPath != null) { 100 if (recordingPath != null && recordingOutputPath != null) {
96 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" 101 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'"
97 "at the same time. Exiting ..."); 102 "at the same time. Exiting ...");
98 exit(1); 103 exit(1);
99 } 104 }
100 105
101 var testCaseRecorder; 106 var testCaseRecorder;
102 if (recordingPath != null) { 107 if (recordingPath != null) {
103 testCaseRecorder = new TestCaseRecorder(new Path(recordingPath)); 108 testCaseRecorder = new TestCaseRecorder(new Path(recordingPath));
104 } 109 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 conf['_servers_'] = servers; 162 conf['_servers_'] = servers;
158 } 163 }
159 164
160 // There should not be more than one InternetExplorerDriver instance 165 // There should not be more than one InternetExplorerDriver instance
161 // running at a time. For details, see 166 // running at a time. For details, see
162 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver. 167 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver.
163 if (conf['runtime'].startsWith('ie')) { 168 if (conf['runtime'].startsWith('ie')) {
164 maxBrowserProcesses = 1; 169 maxBrowserProcesses = 1;
165 } else if (conf['runtime'].startsWith('safari') && 170 } else if (conf['runtime'].startsWith('safari') &&
166 conf['use_browser_controller']) { 171 conf['use_browser_controller']) {
167 // FIXME(kustermann/ricow): Remove this once the new browser_controller is 172 // Safari does not allow us to run from a fresh profile, so we can only
168 // stable. 173 // use one browser.
169 maxBrowserProcesses = math.max(maxProcesses - 3, 1); 174 maxBrowserProcesses = 1;
170 } 175 }
171 176
172 for (String key in selectors.keys) { 177 for (String key in selectors.keys) {
173 if (key == 'co19') { 178 if (key == 'co19') {
174 testSuites.add(new Co19TestSuite(conf)); 179 testSuites.add(new Co19TestSuite(conf));
175 } else if (conf['runtime'] == 'vm' && key == 'vm') { 180 } else if (conf['runtime'] == 'vm' && key == 'vm') {
176 // vm tests contain both cc tests (added here) and dart tests (added 181 // vm tests contain both cc tests (added here) and dart tests (added
177 // in [TEST_SUITE_DIRECTORIES]). 182 // in [TEST_SUITE_DIRECTORIES]).
178 testSuites.add(new VMTestSuite(conf)); 183 testSuites.add(new VMTestSuite(conf));
179 } else if (conf['analyzer']) { 184 } else if (conf['analyzer']) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 startTime, 242 startTime,
238 formatter)); 243 formatter));
239 if (printTiming) { 244 if (printTiming) {
240 eventListener.add(new TimingPrinter(startTime)); 245 eventListener.add(new TimingPrinter(startTime));
241 } 246 }
242 eventListener.add(new SkippedCompilationsPrinter()); 247 eventListener.add(new SkippedCompilationsPrinter());
243 eventListener.add(new LeftOverTempDirPrinter()); 248 eventListener.add(new LeftOverTempDirPrinter());
244 } 249 }
245 eventListener.add(new ExitCodeSetter()); 250 eventListener.add(new ExitCodeSetter());
246 251
247
248 void startProcessQueue() { 252 void startProcessQueue() {
249 // Start process queue. 253 // Start process queue.
250 new ProcessQueue(maxProcesses, 254 new ProcessQueue(maxProcesses,
251 maxBrowserProcesses, 255 maxBrowserProcesses,
252 startTime, 256 startTime,
253 testSuites, 257 testSuites,
254 eventListener, 258 eventListener,
255 allTestsFinished, 259 allTestsFinished,
256 verbose, 260 verbose,
257 listTests, 261 listTests,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 void main() { 312 void main() {
309 deleteTemporaryDartDirectories().then((_) { 313 deleteTemporaryDartDirectories().then((_) {
310 var optionsParser = new TestOptionsParser(); 314 var optionsParser = new TestOptionsParser();
311 var configurations = optionsParser.parse(new Options().arguments); 315 var configurations = optionsParser.parse(new Options().arguments);
312 if (configurations != null && configurations.length > 0) { 316 if (configurations != null && configurations.length > 0) {
313 testConfigurations(configurations); 317 testConfigurations(configurations);
314 } 318 }
315 }); 319 });
316 } 320 }
317 321
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/browser_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698