| OLD | NEW |
| 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 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // We set a special flag in the safari browser if we need to clear out | 95 // We set a special flag in the safari browser if we need to clear out |
| 96 // the cache before running. | 96 // the cache before running. |
| 97 Safari.deleteCache = firstConf['clear_safari_cache']; | 97 Safari.deleteCache = firstConf['clear_safari_cache']; |
| 98 | 98 |
| 99 if (recordingPath != null && recordingOutputPath != null) { | 99 if (recordingPath != null && recordingOutputPath != null) { |
| 100 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" | 100 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" |
| 101 "at the same time. Exiting ..."); | 101 "at the same time. Exiting ..."); |
| 102 exit(1); | 102 exit(1); |
| 103 } | 103 } |
| 104 | 104 |
| 105 var testCaseRecorder; | |
| 106 if (recordingPath != null) { | |
| 107 testCaseRecorder = new TestCaseRecorder(new Path(recordingPath)); | |
| 108 } | |
| 109 | |
| 110 var testCaseOutputArchive; | |
| 111 if (recordingOutputPath != null) { | |
| 112 testCaseOutputArchive = new TestCaseOutputArchive(); | |
| 113 testCaseOutputArchive.loadFromPath(new Path(recordingOutputPath)); | |
| 114 } | |
| 115 | |
| 116 | |
| 117 if (!firstConf['append_logs']) { | 105 if (!firstConf['append_logs']) { |
| 118 var file = new File(TestUtils.flakyFileName()); | 106 var file = new File(TestUtils.flakyFileName()); |
| 119 if (file.existsSync()) { | 107 if (file.existsSync()) { |
| 120 file.deleteSync(); | 108 file.deleteSync(); |
| 121 } | 109 } |
| 122 } | 110 } |
| 123 | 111 |
| 124 DebugLogger.init(firstConf['write_debug_log'] ? | 112 DebugLogger.init(firstConf['write_debug_log'] ? |
| 125 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); | 113 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); |
| 126 | 114 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 formatter)); | 223 formatter)); |
| 236 if (printTiming) { | 224 if (printTiming) { |
| 237 eventListener.add(new TimingPrinter(startTime)); | 225 eventListener.add(new TimingPrinter(startTime)); |
| 238 } | 226 } |
| 239 eventListener.add(new SkippedCompilationsPrinter()); | 227 eventListener.add(new SkippedCompilationsPrinter()); |
| 240 eventListener.add(new LeftOverTempDirPrinter()); | 228 eventListener.add(new LeftOverTempDirPrinter()); |
| 241 } | 229 } |
| 242 eventListener.add(new ExitCodeSetter()); | 230 eventListener.add(new ExitCodeSetter()); |
| 243 | 231 |
| 244 void startProcessQueue() { | 232 void startProcessQueue() { |
| 245 // Start process queue. | 233 // [firstConf] is needed here, since the ProcessQueue needs to know the |
| 246 new ProcessQueue(maxProcesses, | 234 // settings of 'noBatch' and 'local_ip' |
| 235 new ProcessQueue(firstConf, |
| 236 maxProcesses, |
| 247 maxBrowserProcesses, | 237 maxBrowserProcesses, |
| 248 startTime, | 238 startTime, |
| 249 testSuites, | 239 testSuites, |
| 250 eventListener, | 240 eventListener, |
| 251 allTestsFinished, | 241 allTestsFinished, |
| 252 verbose, | 242 verbose, |
| 253 listTests, | 243 listTests, |
| 254 testCaseRecorder, | 244 recordingPath, |
| 255 testCaseOutputArchive); | 245 recordingOutputPath); |
| 256 } | 246 } |
| 257 | 247 |
| 258 // Start all the HTTP servers required before starting the process queue. | 248 // Start all the HTTP servers required before starting the process queue. |
| 259 if (serverFutures.isEmpty) { | 249 if (serverFutures.isEmpty) { |
| 260 startProcessQueue(); | 250 startProcessQueue(); |
| 261 } else { | 251 } else { |
| 262 Future.wait(serverFutures).then((_) => startProcessQueue()); | 252 Future.wait(serverFutures).then((_) => startProcessQueue()); |
| 263 } | 253 } |
| 264 } | 254 } |
| 265 | 255 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 void main() { | 294 void main() { |
| 305 deleteTemporaryDartDirectories().then((_) { | 295 deleteTemporaryDartDirectories().then((_) { |
| 306 var optionsParser = new TestOptionsParser(); | 296 var optionsParser = new TestOptionsParser(); |
| 307 var configurations = optionsParser.parse(new Options().arguments); | 297 var configurations = optionsParser.parse(new Options().arguments); |
| 308 if (configurations != null && configurations.length > 0) { | 298 if (configurations != null && configurations.length > 0) { |
| 309 testConfigurations(configurations); | 299 testConfigurations(configurations); |
| 310 } | 300 } |
| 311 }); | 301 }); |
| 312 } | 302 } |
| 313 | 303 |
| OLD | NEW |