OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library test_configurations; | 5 library test_configurations; |
6 | 6 |
7 import "dart:async"; | 7 import "dart:async"; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import "dart:math" as math; | 9 import "dart:math" as math; |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 new Path('utils/tests/css'), | 49 new Path('utils/tests/css'), |
50 new Path('utils/tests/peg'), | 50 new Path('utils/tests/peg'), |
51 ]; | 51 ]; |
52 | 52 |
53 Future testConfigurations(List<Map> configurations) async { | 53 Future testConfigurations(List<Map> configurations) async { |
54 var startTime = new DateTime.now(); | 54 var startTime = new DateTime.now(); |
55 // Extract global options from first configuration. | 55 // Extract global options from first configuration. |
56 var firstConf = configurations[0]; | 56 var firstConf = configurations[0]; |
57 var maxProcesses = firstConf['tasks']; | 57 var maxProcesses = firstConf['tasks']; |
58 var progressIndicator = firstConf['progress']; | 58 var progressIndicator = firstConf['progress']; |
59 // TODO(kustermann): Remove this option once the buildbots don't use it | |
60 // anymore. | |
61 var failureSummary = firstConf['failure-summary']; | |
62 BuildbotProgressIndicator.stepName = firstConf['step_name']; | 59 BuildbotProgressIndicator.stepName = firstConf['step_name']; |
63 var verbose = firstConf['verbose']; | 60 var verbose = firstConf['verbose']; |
64 var printTiming = firstConf['time']; | 61 var printTiming = firstConf['time']; |
65 var listTests = firstConf['list']; | 62 var listTests = firstConf['list']; |
66 | 63 |
67 var reportInJson = firstConf['report_in_json']; | 64 var reportInJson = firstConf['report_in_json']; |
68 | 65 |
69 var recordingPath = firstConf['record_to_file']; | 66 var recordingPath = firstConf['record_to_file']; |
70 var recordingOutputPath = firstConf['replay_from_file']; | 67 var recordingOutputPath = firstConf['replay_from_file']; |
71 | 68 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 if (firstConf['copy_coredumps']) { | 269 if (firstConf['copy_coredumps']) { |
273 eventListener.add(new UnexpectedCrashDumpArchiver()); | 270 eventListener.add(new UnexpectedCrashDumpArchiver()); |
274 } | 271 } |
275 | 272 |
276 // The only progress indicator when listing tests should be the | 273 // The only progress indicator when listing tests should be the |
277 // the summary printer. | 274 // the summary printer. |
278 if (listTests) { | 275 if (listTests) { |
279 eventListener.add(new SummaryPrinter(jsonOnly: reportInJson)); | 276 eventListener.add(new SummaryPrinter(jsonOnly: reportInJson)); |
280 } else { | 277 } else { |
281 eventListener.add(new ExitCodeSetter()); | 278 eventListener.add(new ExitCodeSetter()); |
| 279 eventListener.add(new IgnoredTestMonitor()); |
282 } | 280 } |
283 | 281 |
284 // If any of the configurations need to access android devices we'll first | 282 // If any of the configurations need to access android devices we'll first |
285 // make a pool of all available adb devices. | 283 // make a pool of all available adb devices. |
286 AdbDevicePool adbDevicePool; | 284 AdbDevicePool adbDevicePool; |
287 bool needsAdbDevicePool = configurations.any((Map conf) { | 285 bool needsAdbDevicePool = configurations.any((Map conf) { |
288 return conf['runtime'] == 'dart_precompiled' && | 286 return conf['runtime'] == 'dart_precompiled' && |
289 conf['system'] == 'android'; | 287 conf['system'] == 'android'; |
290 }); | 288 }); |
291 if (needsAdbDevicePool) { | 289 if (needsAdbDevicePool) { |
(...skipping 13 matching lines...) Expand all Loading... |
305 maxBrowserProcesses, | 303 maxBrowserProcesses, |
306 startTime, | 304 startTime, |
307 testSuites, | 305 testSuites, |
308 eventListener, | 306 eventListener, |
309 allTestsFinished, | 307 allTestsFinished, |
310 verbose, | 308 verbose, |
311 recordingPath, | 309 recordingPath, |
312 recordingOutputPath, | 310 recordingOutputPath, |
313 adbDevicePool); | 311 adbDevicePool); |
314 } | 312 } |
OLD | NEW |