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

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

Issue 2750403006: test.py: Push dart_precompiled_runtime and process_test once per device instead of once per test. (Closed)
Patch Set: . Created 3 years, 9 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 | « tools/testing/dart/android.dart ('k') | 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 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2727 .map((path) => path.substring(path.lastIndexOf('/') + 1)) 2727 .map((path) => path.substring(path.lastIndexOf('/') + 1))
2728 .toList(); 2728 .toList();
2729 2729
2730 var timeoutDuration = new Duration(seconds: timeout); 2730 var timeoutDuration = new Duration(seconds: timeout);
2731 2731
2732 // All closures are of type "Future<AdbCommandResult> run()" 2732 // All closures are of type "Future<AdbCommandResult> run()"
2733 List<Function> steps = []; 2733 List<Function> steps = [];
2734 2734
2735 steps.add(() => device.runAdbShellCommand(['rm', '-Rf', deviceTestDir])); 2735 steps.add(() => device.runAdbShellCommand(['rm', '-Rf', deviceTestDir]));
2736 steps.add(() => device.runAdbShellCommand(['mkdir', '-p', deviceTestDir])); 2736 steps.add(() => device.runAdbShellCommand(['mkdir', '-p', deviceTestDir]));
2737 // TODO: We should find a way for us to cache the runner binary and avoid 2737 steps.add(() => device.pushCachedData(runner,
2738 // pushhing it for every single test (this is bad for SSD cycle time, test 2738 '$devicedir/dart_precompiled_runtime') );
2739 // timing). 2739 steps.add(() => device.pushCachedData(processTest,
2740 steps.add(() => device.runAdbCommand( 2740 '$devicedir/process_test'));
2741 ['push', runner, '$devicedir/dart_precompiled_runtime']));
2742 steps.add(() => device.runAdbCommand(
2743 ['push', processTest, '$devicedir/process_test']));
2744 steps.add(() => device.runAdbShellCommand( 2741 steps.add(() => device.runAdbShellCommand(
2745 ['chmod', '777', '$devicedir/dart_precompiled_runtime $devicedir/process _test'])); 2742 ['chmod', '777', '$devicedir/dart_precompiled_runtime $devicedir/process _test']));
2746 2743
2747 for (var file in files) { 2744 for (var file in files) {
2748 steps.add(() => device 2745 steps.add(() => device
2749 .runAdbCommand(['push', '$testdir/$file', '$deviceTestDir/$file'])); 2746 .runAdbCommand(['push', '$testdir/$file', '$deviceTestDir/$file']));
2750 } 2747 }
2751 2748
2752 steps.add(() => device.runAdbShellCommand( 2749 steps.add(() => device.runAdbShellCommand(
2753 [ 2750 [
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
3227 } 3224 }
3228 } 3225 }
3229 3226
3230 void eventAllTestsDone() { 3227 void eventAllTestsDone() {
3231 for (var listener in _eventListener) { 3228 for (var listener in _eventListener) {
3232 listener.allDone(); 3229 listener.allDone();
3233 } 3230 }
3234 _allDone(); 3231 _allDone();
3235 } 3232 }
3236 } 3233 }
OLDNEW
« no previous file with comments | « tools/testing/dart/android.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698