| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 | 7 |
| 8 import 'package:async/async.dart' hide Result; | 8 import 'package:async/async.dart' hide Result; |
| 9 import 'package:collection/collection.dart'; | 9 import 'package:collection/collection.dart'; |
| 10 import 'package:pool/pool.dart'; | 10 import 'package:pool/pool.dart'; |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 _restarted.remove(liveTest); | 358 _restarted.remove(liveTest); |
| 359 } | 359 } |
| 360 | 360 |
| 361 /// Runs a dummy [LiveTest] for a test or group marked as "skip". | 361 /// Runs a dummy [LiveTest] for a test or group marked as "skip". |
| 362 /// | 362 /// |
| 363 /// [suiteController] is the controller for the suite that contains [entry]. | 363 /// [suiteController] is the controller for the suite that contains [entry]. |
| 364 /// [parents] is a list of groups that contain [entry]. | 364 /// [parents] is a list of groups that contain [entry]. |
| 365 Future _runSkippedTest(LiveSuiteController suiteController, GroupEntry entry, | 365 Future _runSkippedTest(LiveSuiteController suiteController, GroupEntry entry, |
| 366 List<Group> parents) { | 366 List<Group> parents) { |
| 367 // The netry name will be `null` for the root group. | 367 // The netry name will be `null` for the root group. |
| 368 var test = new LocalTest(entry.name ?? "(suite)", entry.metadata, () {}); | 368 var test = new LocalTest(entry.name ?? "(suite)", entry.metadata, () {}, |
| 369 trace: entry.trace); |
| 369 | 370 |
| 370 var controller; | 371 var controller; |
| 371 controller = new LiveTestController( | 372 controller = new LiveTestController( |
| 372 suiteController.liveSuite.suite, test, () { | 373 suiteController.liveSuite.suite, test, () { |
| 373 controller.setState(const State(Status.running, Result.success)); | 374 controller.setState(const State(Status.running, Result.success)); |
| 374 controller.setState(const State(Status.complete, Result.success)); | 375 controller.setState(const State(Status.complete, Result.success)); |
| 375 controller.completer.complete(); | 376 controller.completer.complete(); |
| 376 }, () {}, groups: parents); | 377 }, () {}, groups: parents); |
| 377 | 378 |
| 378 return _runLiveTest(suiteController, controller.liveTest); | 379 return _runLiveTest(suiteController, controller.liveTest); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 var futures = allLiveTests.map((liveTest) => liveTest.close()).toList(); | 481 var futures = allLiveTests.map((liveTest) => liveTest.close()).toList(); |
| 481 | 482 |
| 482 // Closing the load pool will close the test suites as soon as their tests | 483 // Closing the load pool will close the test suites as soon as their tests |
| 483 // are done. For browser suites this is effectively immediate since their | 484 // are done. For browser suites this is effectively immediate since their |
| 484 // tests shut down as soon as they're closed, but for VM suites we may need | 485 // tests shut down as soon as they're closed, but for VM suites we may need |
| 485 // to wait for tearDowns or tearDownAlls to run. | 486 // to wait for tearDowns or tearDownAlls to run. |
| 486 futures.add(_loadPool.close()); | 487 futures.add(_loadPool.close()); |
| 487 await Future.wait(futures, eagerError: true); | 488 await Future.wait(futures, eagerError: true); |
| 488 } | 489 } |
| 489 } | 490 } |
| OLD | NEW |