| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // the cache before running. | 92 // the cache before running. |
| 93 Safari.deleteCache = firstConf['clear_safari_cache']; | 93 Safari.deleteCache = firstConf['clear_safari_cache']; |
| 94 | 94 |
| 95 if (recordingPath != null && recordingOutputPath != null) { | 95 if (recordingPath != null && recordingOutputPath != null) { |
| 96 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" | 96 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" |
| 97 "at the same time. Exiting ..."); | 97 "at the same time. Exiting ..."); |
| 98 exit(1); | 98 exit(1); |
| 99 } | 99 } |
| 100 | 100 |
| 101 if (!firstConf['append_logs']) { | 101 if (!firstConf['append_logs']) { |
| 102 var file = new File(TestUtils.flakyFileName()); | 102 var files = [new File(TestUtils.flakyFileName()), |
| 103 if (file.existsSync()) { | 103 new File(TestUtils.testOutcomeFileName())]; |
| 104 file.deleteSync(); | 104 for (var file in files) { |
| 105 if (file.existsSync()) { |
| 106 file.deleteSync(); |
| 107 } |
| 105 } | 108 } |
| 106 } | 109 } |
| 107 | 110 |
| 108 DebugLogger.init(firstConf['write_debug_log'] ? | 111 DebugLogger.init(firstConf['write_debug_log'] ? |
| 109 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); | 112 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); |
| 110 | 113 |
| 111 // Print the configurations being run by this execution of | 114 // Print the configurations being run by this execution of |
| 112 // test.dart. However, don't do it if the silent progress indicator | 115 // test.dart. However, don't do it if the silent progress indicator |
| 113 // is used. This is only needed because of the junit tests. | 116 // is used. This is only needed because of the junit tests. |
| 114 if (progressIndicator != 'silent') { | 117 if (progressIndicator != 'silent') { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 236 } |
| 234 eventListener.add(progressIndicatorFromName(progressIndicator, | 237 eventListener.add(progressIndicatorFromName(progressIndicator, |
| 235 startTime, | 238 startTime, |
| 236 formatter)); | 239 formatter)); |
| 237 if (printTiming) { | 240 if (printTiming) { |
| 238 eventListener.add(new TimingPrinter(startTime)); | 241 eventListener.add(new TimingPrinter(startTime)); |
| 239 } | 242 } |
| 240 eventListener.add(new SkippedCompilationsPrinter()); | 243 eventListener.add(new SkippedCompilationsPrinter()); |
| 241 eventListener.add(new LeftOverTempDirPrinter()); | 244 eventListener.add(new LeftOverTempDirPrinter()); |
| 242 } | 245 } |
| 246 if (firstConf['write_test_outcome_log']) { |
| 247 eventListener.add(new TestOutcomeLogWriter()); |
| 248 } |
| 243 eventListener.add(new ExitCodeSetter()); | 249 eventListener.add(new ExitCodeSetter()); |
| 244 | 250 |
| 245 void startProcessQueue() { | 251 void startProcessQueue() { |
| 246 // [firstConf] is needed here, since the ProcessQueue needs to know the | 252 // [firstConf] is needed here, since the ProcessQueue needs to know the |
| 247 // settings of 'noBatch' and 'local_ip' | 253 // settings of 'noBatch' and 'local_ip' |
| 248 new ProcessQueue(firstConf, | 254 new ProcessQueue(firstConf, |
| 249 maxProcesses, | 255 maxProcesses, |
| 250 maxBrowserProcesses, | 256 maxBrowserProcesses, |
| 251 startTime, | 257 startTime, |
| 252 testSuites, | 258 testSuites, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 void main(List<String> arguments) { | 293 void main(List<String> arguments) { |
| 288 deleteTemporaryDartDirectories().then((_) { | 294 deleteTemporaryDartDirectories().then((_) { |
| 289 var optionsParser = new TestOptionsParser(); | 295 var optionsParser = new TestOptionsParser(); |
| 290 var configurations = optionsParser.parse(arguments); | 296 var configurations = optionsParser.parse(arguments); |
| 291 if (configurations != null && configurations.length > 0) { | 297 if (configurations != null && configurations.length > 0) { |
| 292 testConfigurations(configurations); | 298 testConfigurations(configurations); |
| 293 } | 299 } |
| 294 }); | 300 }); |
| 295 } | 301 } |
| 296 | 302 |
| OLD | NEW |