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

Unified Diff: tools/testing/dart/test_runner.dart

Issue 10392078: Report total time for multiphase tests, in test script's --test option, not time of last phase. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve long line fixes. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 49371c031cb951639ba13f8d8a2da8a7945ad271..7c7e78781eb246530aafb34e5b11daa1195d362c 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -240,8 +240,12 @@ class TestOutputImpl implements TestOutput {
diagnostics = [];
}
- factory TestOutputImpl.fromCase (TestCase testCase, int exitCode, bool timedOut,
- List<String> stdout, List<String> stderr, Duration time) {
+ factory TestOutputImpl.fromCase (TestCase testCase,
+ int exitCode,
+ bool timedOut,
+ List<String> stdout,
+ List<String> stderr,
+ Duration time) {
if (testCase is BrowserTestCase) {
return new BrowserTestOutputImpl(testCase, exitCode, timedOut,
stdout, stderr, time);
@@ -427,21 +431,23 @@ class AnalysisTestOutputImpl extends TestOutputImpl {
return true;
}
if (numStaticTypeAnnotations > 0 && isStaticClean) {
- diagnostics.add("Cannot have both @static-clean and /// static type warning annotations.");
+ diagnostics.add("Cannot have both @static-clean and /// static "
+ "type warning annotations.");
return true;
}
if (isStaticClean && staticWarnings.length > 0) {
- diagnostics.add("@static-clean annotation found but analyzer returned warnings.");
+ diagnostics.add(
+ "@static-clean annotation found but analyzer returned warnings.");
return true;
}
if (numCompileTimeAnnotations > 0
&& numCompileTimeAnnotations < errors.length) {
-
- // Expected compile-time errors were not returned. The test did not 'fail' in the way
- // intended so don't return failed.
- diagnostics.add("Fewer compile time errors than annotated: ${numCompileTimeAnnotations}");
+ // Expected compile-time errors were not returned.
+ // The test did not 'fail' in the way intended so don't return failed.
+ diagnostics.add("Fewer compile time errors than annotated: "
+ "$numCompileTimeAnnotations");
return false;
}
@@ -449,7 +455,8 @@ class AnalysisTestOutputImpl extends TestOutputImpl {
// TODO(zundel): match up the annotation line numbers
// with the reported error line numbers
if (staticWarnings.length < numStaticTypeAnnotations) {
- diagnostics.add("Fewer static type warnings than annotated: ${numStaticTypeAnnotations}");
+ diagnostics.add("Fewer static type warnings than annotated: "
+ "$numStaticTypeAnnotations");
return true;
}
return false;
@@ -593,6 +600,7 @@ class RunningProcess {
stdout = new List<String>();
stderr = new List<String>();
currentStep = 0;
+ startTime = new Date.now();
runCommand(testCase.commands[currentStep++], stepExitHandler);
}
@@ -611,7 +619,6 @@ class RunningProcess {
print(" Command: $command");
print(" Error: $e");
};
- startTime = new Date.now();
InputStream stdoutStream = process.stdout;
InputStream stderrStream = process.stderr;
StringInputStream stdoutStringStream = new StringInputStream(stdoutStream);
@@ -735,8 +742,9 @@ class BatchRunnerProcess {
var exitCode = 0;
if (outcome == "CRASH") exitCode = -10;
if (outcome == "FAIL" || outcome == "TIMEOUT") exitCode = 1;
- new TestOutput.fromCase(_currentTest, exitCode, outcome == "TIMEOUT",
- _testStdout, _testStderr, new Date.now().difference(_startTime));
+ new TestOutput.fromCase(_currentTest, exitCode, (outcome == "TIMEOUT"),
+ _testStdout, _testStderr,
+ new Date.now().difference(_startTime));
// Move on when both stdout and stderr has been drained. If the test
// crashed, we restarted the process and therefore do not attempt to
// drain stderr.
« 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