| 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 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2600 steps.add(() => device.runAdbCommand( | 2600 steps.add(() => device.runAdbCommand( |
| 2601 ['push', runner, '$devicedir/dart_precompiled_runtime'])); | 2601 ['push', runner, '$devicedir/dart_precompiled_runtime'])); |
| 2602 steps.add(() => device.runAdbShellCommand( | 2602 steps.add(() => device.runAdbShellCommand( |
| 2603 ['chmod', '777', '$devicedir/dart_precompiled_runtime'])); | 2603 ['chmod', '777', '$devicedir/dart_precompiled_runtime'])); |
| 2604 | 2604 |
| 2605 for (var file in files) { | 2605 for (var file in files) { |
| 2606 steps.add(() => device | 2606 steps.add(() => device |
| 2607 .runAdbCommand(['push', '$testdir/$file', '$deviceTestDir/$file'])); | 2607 .runAdbCommand(['push', '$testdir/$file', '$deviceTestDir/$file'])); |
| 2608 } | 2608 } |
| 2609 | 2609 |
| 2610 if (command.useBlobs) { | 2610 var args = new List(); |
| 2611 steps.add(() => device.runAdbShellCommand( | 2611 args.addAll(arguments); |
| 2612 [ | 2612 for (var i = 0; i < args.length; i++) { |
| 2613 '$devicedir/dart_precompiled_runtime', | 2613 if (args[i].endsWith(".dart")) { |
| 2614 '--run-app-snapshot=$deviceTestDir', | 2614 args[i] = "$deviceTestDir/out.aotsnapshot"; |
| 2615 '--use-blobs' | 2615 } |
| 2616 ]..addAll(arguments), | |
| 2617 timeout: timeoutDuration)); | |
| 2618 } else { | |
| 2619 steps.add(() => device.runAdbShellCommand( | |
| 2620 [ | |
| 2621 '$devicedir/dart_precompiled_runtime', | |
| 2622 '--run-app-snapshot=$deviceTestDir' | |
| 2623 ]..addAll(arguments), | |
| 2624 timeout: timeoutDuration)); | |
| 2625 } | 2616 } |
| 2626 | 2617 |
| 2618 steps.add(() => device.runAdbShellCommand( |
| 2619 [ |
| 2620 '$devicedir/dart_precompiled_runtime', |
| 2621 ]..addAll(args), |
| 2622 timeout: timeoutDuration)); |
| 2623 |
| 2627 var stopwatch = new Stopwatch()..start(); | 2624 var stopwatch = new Stopwatch()..start(); |
| 2628 var writer = new StringBuffer(); | 2625 var writer = new StringBuffer(); |
| 2629 | 2626 |
| 2630 await device.waitForBootCompleted(); | 2627 await device.waitForBootCompleted(); |
| 2631 await device.waitForDevice(); | 2628 await device.waitForDevice(); |
| 2632 | 2629 |
| 2633 AdbCommandResult result; | 2630 AdbCommandResult result; |
| 2634 for (var i = 0; i < steps.length; i++) { | 2631 for (var i = 0; i < steps.length; i++) { |
| 2635 var fun = steps[i]; | 2632 var fun = steps[i]; |
| 2636 var commandStopwatch = new Stopwatch()..start(); | 2633 var commandStopwatch = new Stopwatch()..start(); |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3078 } | 3075 } |
| 3079 } | 3076 } |
| 3080 | 3077 |
| 3081 void eventAllTestsDone() { | 3078 void eventAllTestsDone() { |
| 3082 for (var listener in _eventListener) { | 3079 for (var listener in _eventListener) { |
| 3083 listener.allDone(); | 3080 listener.allDone(); |
| 3084 } | 3081 } |
| 3085 _allDone(); | 3082 _allDone(); |
| 3086 } | 3083 } |
| 3087 } | 3084 } |
| OLD | NEW |