| 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 /** | 5 /** |
| 6 * Classes and methods for executing tests. | 6 * Classes and methods for executing tests. |
| 7 * | 7 * |
| 8 * This module includes: | 8 * This module includes: |
| 9 * - Managing parallel execution of tests, including timeout checks. | 9 * - Managing parallel execution of tests, including timeout checks. |
| 10 * - Evaluating the output of each test as pass/fail/crash/timeout. | 10 * - Evaluating the output of each test as pass/fail/crash/timeout. |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 JSCommandlineCommand._( | 445 JSCommandlineCommand._( |
| 446 String displayName, String executable, List<String> arguments, | 446 String displayName, String executable, List<String> arguments, |
| 447 [Map<String, String> environmentOverrides = null]) | 447 [Map<String, String> environmentOverrides = null]) |
| 448 : super._(displayName, executable, arguments, environmentOverrides); | 448 : super._(displayName, executable, arguments, environmentOverrides); |
| 449 } | 449 } |
| 450 | 450 |
| 451 class PubCommand extends ProcessCommand { | 451 class PubCommand extends ProcessCommand { |
| 452 final String command; | 452 final String command; |
| 453 | 453 |
| 454 PubCommand._(String pubCommand, String pubExecutable, | 454 PubCommand._(String pubCommand, String pubExecutable, |
| 455 String pubspecYamlDirectory, String pubCacheDirectory) | 455 String pubspecYamlDirectory, String pubCacheDirectory, List<String> args) |
| 456 : super._( | 456 : super._( |
| 457 'pub_$pubCommand', | 457 'pub_$pubCommand', |
| 458 new io.File(pubExecutable).absolute.path, | 458 new io.File(pubExecutable).absolute.path, |
| 459 [pubCommand], | 459 [pubCommand]..addAll(args), |
| 460 {'PUB_CACHE': pubCacheDirectory}, | 460 {'PUB_CACHE': pubCacheDirectory}, |
| 461 pubspecYamlDirectory), | 461 pubspecYamlDirectory), |
| 462 command = pubCommand; | 462 command = pubCommand; |
| 463 | 463 |
| 464 void _buildHashCode(HashCodeBuilder builder) { | 464 void _buildHashCode(HashCodeBuilder builder) { |
| 465 super._buildHashCode(builder); | 465 super._buildHashCode(builder); |
| 466 builder.addJson(command); | 466 builder.addJson(command); |
| 467 } | 467 } |
| 468 | 468 |
| 469 bool _equal(PubCommand other) => | 469 bool _equal(PubCommand other) => |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 return _getUniqueCommand(command); | 688 return _getUniqueCommand(command); |
| 689 } | 689 } |
| 690 | 690 |
| 691 Command getCopyCommand(String sourceDirectory, String destinationDirectory) { | 691 Command getCopyCommand(String sourceDirectory, String destinationDirectory) { |
| 692 var command = | 692 var command = |
| 693 new CleanDirectoryCopyCommand._(sourceDirectory, destinationDirectory); | 693 new CleanDirectoryCopyCommand._(sourceDirectory, destinationDirectory); |
| 694 return _getUniqueCommand(command); | 694 return _getUniqueCommand(command); |
| 695 } | 695 } |
| 696 | 696 |
| 697 Command getPubCommand(String pubCommand, String pubExecutable, | 697 Command getPubCommand(String pubCommand, String pubExecutable, |
| 698 String pubspecYamlDirectory, String pubCacheDirectory) { | 698 String pubspecYamlDirectory, String pubCacheDirectory, |
| 699 {List<String> arguments: const <String>[]}) { |
| 699 var command = new PubCommand._( | 700 var command = new PubCommand._( |
| 700 pubCommand, pubExecutable, pubspecYamlDirectory, pubCacheDirectory); | 701 pubCommand, pubExecutable, pubspecYamlDirectory, pubCacheDirectory, |
| 702 arguments); |
| 701 return _getUniqueCommand(command); | 703 return _getUniqueCommand(command); |
| 702 } | 704 } |
| 703 | 705 |
| 704 Command getMakeSymlinkCommand(String link, String target) { | 706 Command getMakeSymlinkCommand(String link, String target) { |
| 705 return _getUniqueCommand(new MakeSymlinkCommand._(link, target)); | 707 return _getUniqueCommand(new MakeSymlinkCommand._(link, target)); |
| 706 } | 708 } |
| 707 | 709 |
| 708 Command _getUniqueCommand(Command command) { | 710 Command _getUniqueCommand(Command command) { |
| 709 // All Command classes implement hashCode and operator==. | 711 // All Command classes implement hashCode and operator==. |
| 710 // We check if this command has already been built. | 712 // We check if this command has already been built. |
| (...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3307 } | 3309 } |
| 3308 } | 3310 } |
| 3309 | 3311 |
| 3310 void eventAllTestsDone() { | 3312 void eventAllTestsDone() { |
| 3311 for (var listener in _eventListener) { | 3313 for (var listener in _eventListener) { |
| 3312 listener.allDone(); | 3314 listener.allDone(); |
| 3313 } | 3315 } |
| 3314 _allDone(); | 3316 _allDone(); |
| 3315 } | 3317 } |
| 3316 } | 3318 } |
| OLD | NEW |