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

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

Issue 3014593002: Use generic functions in zones. (Closed)
Patch Set: Added changes missing from patch set #2 Created 3 years, 3 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
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 } 1005 }
1006 1006
1007 _numProcesses++; 1007 _numProcesses++;
1008 if (isBrowserCommand) _numBrowserProcesses++; 1008 if (isBrowserCommand) _numBrowserProcesses++;
1009 1009
1010 var node = enqueuer.command2node[command]; 1010 var node = enqueuer.command2node[command];
1011 Iterable<TestCase> testCases = enqueuer.command2testCases[command]; 1011 Iterable<TestCase> testCases = enqueuer.command2testCases[command];
1012 // If a command is part of many TestCases we set the timeout to be 1012 // If a command is part of many TestCases we set the timeout to be
1013 // the maximum over all [TestCase.timeout]s. At some point, we might 1013 // the maximum over all [TestCase.timeout]s. At some point, we might
1014 // eliminate [TestCase.timeout] completely and move it to [Command]. 1014 // eliminate [TestCase.timeout] completely and move it to [Command].
1015 int timeout = 1015 int timeout = testCases
1016 testCases.map((TestCase test) => test.timeout).fold(0, math.max); 1016 .map((TestCase test) => test.timeout)
1017 .fold(0, (int a, b) => math.max(a, b));
1017 1018
1018 if (_verbose) { 1019 if (_verbose) {
1019 print('Running "${command.displayName}" command: $command'); 1020 print('Running "${command.displayName}" command: $command');
1020 } 1021 }
1021 1022
1022 executor.runCommand(node, command, timeout).then((CommandOutput output) { 1023 executor.runCommand(node, command, timeout).then((CommandOutput output) {
1023 assert(command == output.command); 1024 assert(command == output.command);
1024 1025
1025 _commandOutputStream.add(output); 1026 _commandOutputStream.add(output);
1026 if (output.canRunDependendCommands) { 1027 if (output.canRunDependendCommands) {
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 } 1643 }
1643 } 1644 }
1644 1645
1645 void eventAllTestsDone() { 1646 void eventAllTestsDone() {
1646 for (var listener in _eventListener) { 1647 for (var listener in _eventListener) {
1647 listener.allDone(); 1648 listener.allDone();
1648 } 1649 }
1649 _allDone(); 1650 _allDone();
1650 } 1651 }
1651 } 1652 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Window.darttemplate ('k') | utils/compiler/create_snapshot_entry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698