Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1403)

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 1963573002: Fix running precompiled tests on Android. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 List<Function> steps = []; 2536 List<Function> steps = [];
2537 2537
2538 steps.add(() => device.runAdbShellCommand( 2538 steps.add(() => device.runAdbShellCommand(
2539 ['rm', '-Rf', deviceTestDir])); 2539 ['rm', '-Rf', deviceTestDir]));
2540 steps.add(() => device.runAdbShellCommand( 2540 steps.add(() => device.runAdbShellCommand(
2541 ['mkdir', '-p', deviceTestDir])); 2541 ['mkdir', '-p', deviceTestDir]));
2542 // TODO: We should find a way for us to cache the runner binary and avoid 2542 // TODO: We should find a way for us to cache the runner binary and avoid
2543 // pushhing it for every single test (this is bad for SSD cycle time, test 2543 // pushhing it for every single test (this is bad for SSD cycle time, test
2544 // timing). 2544 // timing).
2545 steps.add(() => device.runAdbCommand( 2545 steps.add(() => device.runAdbCommand(
2546 ['push', runner, '$devicedir/runner'])); 2546 ['push', runner, '$devicedir/dart_precompiled_runtime']));
2547 steps.add(() => device.runAdbShellCommand( 2547 steps.add(() => device.runAdbShellCommand(
2548 ['chmod', '777', '$devicedir/runner'])); 2548 ['chmod', '777', '$devicedir/dart_precompiled_runtime']));
2549 2549
2550 for (var file in files) { 2550 for (var file in files) {
2551 steps.add(() => device.runAdbCommand( 2551 steps.add(() => device.runAdbCommand(
2552 ['push', '$testdir/$file', '$deviceTestDir/$file'])); 2552 ['push', '$testdir/$file', '$deviceTestDir/$file']));
2553 } 2553 }
2554 2554
2555 if (command.useBlobs) { 2555 if (command.useBlobs) {
2556 steps.add(() => device.runAdbShellCommand( 2556 steps.add(() => device.runAdbShellCommand(
2557 ['$devicedir/runner', '--run-precompiled-snapshot=$deviceTestDir', 2557 ['$devicedir/dart_precompiled_runtime',
2558 '--use_blobs', 'ignored.dart'], timeout: timeoutDuration)); 2558 '--run-app-snapshot=$deviceTestDir',
2559 '--use-blobs', 'ignored.dart'],
2560 timeout: timeoutDuration));
2559 } else { 2561 } else {
2560 steps.add(() => device.runAdbShellCommand( 2562 steps.add(() => device.runAdbShellCommand(
2561 ['$devicedir/runner', '--run-precompiled-snapshot=$deviceTestDir', 2563 ['$devicedir/dart_precompiled_runtime',
2562 'ignored.dart'], timeout: timeoutDuration)); 2564 '--run-app-snapshot=$deviceTestDir',
2565 'ignored.dart'],
2566 timeout: timeoutDuration));
2563 } 2567 }
2564 2568
2565 var stopwatch = new Stopwatch()..start(); 2569 var stopwatch = new Stopwatch()..start();
2566 var writer = new StringBuffer(); 2570 var writer = new StringBuffer();
2567 2571
2568 await device.waitForBootCompleted(); 2572 await device.waitForBootCompleted();
2569 await device.waitForDevice(); 2573 await device.waitForDevice();
2570 2574
2571 AdbCommandResult result; 2575 AdbCommandResult result;
2572 for (var i = 0; i < steps.length; i++) { 2576 for (var i = 0; i < steps.length; i++) {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
3017 } 3021 }
3018 } 3022 }
3019 3023
3020 void eventAllTestsDone() { 3024 void eventAllTestsDone() {
3021 for (var listener in _eventListener) { 3025 for (var listener in _eventListener) {
3022 listener.allDone(); 3026 listener.allDone();
3023 } 3027 }
3024 _allDone(); 3028 _allDone();
3025 } 3029 }
3026 } 3030 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698