| 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 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2575 var runner = command.precompiledRunnerFilename; | 2575 var runner = command.precompiledRunnerFilename; |
| 2576 var testdir = command.precompiledTestDirectory; | 2576 var testdir = command.precompiledTestDirectory; |
| 2577 var arguments = command.arguments; | 2577 var arguments = command.arguments; |
| 2578 var devicedir = '/data/local/tmp/precompilation-testing'; | 2578 var devicedir = '/data/local/tmp/precompilation-testing'; |
| 2579 var deviceTestDir = '/data/local/tmp/precompilation-testing/test'; | 2579 var deviceTestDir = '/data/local/tmp/precompilation-testing/test'; |
| 2580 | 2580 |
| 2581 // We copy all the files which the vm precompiler puts into the test | 2581 // We copy all the files which the vm precompiler puts into the test |
| 2582 // directory. | 2582 // directory. |
| 2583 List<String> files = new io.Directory(testdir) | 2583 List<String> files = new io.Directory(testdir) |
| 2584 .listSync() | 2584 .listSync() |
| 2585 .where((fse) => fse is io.File) | |
| 2586 .map((file) => file.path) | 2585 .map((file) => file.path) |
| 2587 .map((path) => path.substring(path.lastIndexOf('/') + 1)) | 2586 .map((path) => path.substring(path.lastIndexOf('/') + 1)) |
| 2588 .toList(); | 2587 .toList(); |
| 2589 | 2588 |
| 2590 var timeoutDuration = new Duration(seconds: timeout); | 2589 var timeoutDuration = new Duration(seconds: timeout); |
| 2591 | 2590 |
| 2592 // All closures are of type "Future<AdbCommandResult> run()" | 2591 // All closures are of type "Future<AdbCommandResult> run()" |
| 2593 List<Function> steps = []; | 2592 List<Function> steps = []; |
| 2594 | 2593 |
| 2595 steps.add(() => device.runAdbShellCommand(['rm', '-Rf', deviceTestDir])); | 2594 steps.add(() => device.runAdbShellCommand(['rm', '-Rf', deviceTestDir])); |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3075 } | 3074 } |
| 3076 } | 3075 } |
| 3077 | 3076 |
| 3078 void eventAllTestsDone() { | 3077 void eventAllTestsDone() { |
| 3079 for (var listener in _eventListener) { | 3078 for (var listener in _eventListener) { |
| 3080 listener.allDone(); | 3079 listener.allDone(); |
| 3081 } | 3080 } |
| 3082 _allDone(); | 3081 _allDone(); |
| 3083 } | 3082 } |
| 3084 } | 3083 } |
| OLD | NEW |