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

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

Issue 12092041: Only print stdout/stderr if we've got an unexpected output (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« 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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 var lastCommandCompleted = (numberOfCommandOutputs == numberOfCommands); 1685 var lastCommandCompleted = (numberOfCommandOutputs == numberOfCommands);
1686 var lastCommandOutput = testCase.lastCommandOutput; 1686 var lastCommandOutput = testCase.lastCommandOutput;
1687 var lastCommand = lastCommandOutput.command; 1687 var lastCommand = lastCommandOutput.command;
1688 var timedOut = lastCommandOutput.hasTimedOut; 1688 var timedOut = lastCommandOutput.hasTimedOut;
1689 var nonZeroExitCode = lastCommandOutput.exitCode != 0; 1689 var nonZeroExitCode = lastCommandOutput.exitCode != 0;
1690 // NOTE: If this was the last command or there was unexpected output 1690 // NOTE: If this was the last command or there was unexpected output
1691 // we're done with the test. 1691 // we're done with the test.
1692 // Otherwise we need to enqueue it again into the test queue. 1692 // Otherwise we need to enqueue it again into the test queue.
1693 if (lastCommandCompleted || timedOut || nonZeroExitCode) { 1693 if (lastCommandCompleted || timedOut || nonZeroExitCode) {
1694 var verbose = testCase.configuration['verbose']; 1694 var verbose = testCase.configuration['verbose'];
1695 if (nonZeroExitCode && verbose != null && verbose) { 1695 if (lastCommandOutput.unexpectedOutput && verbose != null && verbose) {
1696 print(testCase.displayName); 1696 print(testCase.displayName);
1697 print("stderr:"); 1697 print("stderr:");
1698 print(decodeUtf8(lastCommandOutput.stderr)); 1698 print(decodeUtf8(lastCommandOutput.stderr));
1699 if (!lastCommand.isPixelTest) { 1699 if (!lastCommand.isPixelTest) {
1700 print("stdout:"); 1700 print("stdout:");
1701 print(decodeUtf8(lastCommandOutput.stdout)); 1701 print(decodeUtf8(lastCommandOutput.stdout));
1702 } else { 1702 } else {
1703 print(""); 1703 print("");
1704 print("DRT pixel test failed! stdout is not printed because it " 1704 print("DRT pixel test failed! stdout is not printed because it "
1705 "contains binary data!"); 1705 "contains binary data!");
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 completer.complete(testCase); 1742 completer.complete(testCase);
1743 } 1743 }
1744 }); 1744 });
1745 } 1745 }
1746 runCommand(); 1746 runCommand();
1747 1747
1748 return completer.future; 1748 return completer.future;
1749 } 1749 }
1750 } 1750 }
1751 1751
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