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

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

Issue 11633016: Added debugging information in the testing infrastructure. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 5117ac17c7f3299603485c47fd47276a113120d1..3dbca06f42879e023b4e59c686d996e1d33585cb 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -631,6 +631,7 @@ class BrowserCommandOutputImpl extends CommandOutputImpl {
if ((testCase as BrowserTestCase).numRetries > 0) {
requestRetry = true;
}
+ printDebug("Failed because of missing XDisplay");
return true;
}
}
@@ -673,23 +674,36 @@ class BrowserCommandOutputImpl extends CommandOutputImpl {
bytesNewLine.length;
var endPosition = stdout.length - bytesEOF.length;
- return !areByteArraysEqual(expectedContent,
- 0,
- stdout,
- startPosition,
- endPosition - startPosition);
+ var _failed = !areByteArraysEqual(expectedContent,
+ 0,
+ stdout,
+ startPosition,
+ endPosition - startPosition);
+ if (_failed) {
+ printDebug("Failed because command.expectedOutputFile doesn't "
+ "match stdout of DRT");
+ }
+ return _failed;
}
}
+ printDebug("Failed because we didn't find 'Content-Length' in the DRT "
+ "output");
return true;
} else {
- return !areByteArraysEqual(expectedContent, 0,
- stdout, 0,
- stdout.length);
+ var _failed = !areByteArraysEqual(expectedContent, 0,
+ stdout, 0,
+ stdout.length);
+ if (_failed) {
+ printDebug("Failed because command.expectedOutputFile doesn't match "
+ "stdout of DRT");
+ }
+ return _failed;
}
}
+ printDebug("Failed because command.expectedOutputFile doesn't exist");
return true;
}
-
+
bool get _browserTestFailure {
// Browser tests fail unless stdout contains
// 'Content-Type: text/plain' followed by 'PASS'.
@@ -702,13 +716,28 @@ class BrowserCommandOutputImpl extends CommandOutputImpl {
break;
case 'PASS':
if (has_content_type) {
- return (exitCode != 0 && !hasCrashed);
+ var _failed = (exitCode != 0 && !hasCrashed);
+ if (_failed) {
+ printDebug("Failed because '(exitCode != 0 && !hasCrashed) was "
+ "true");
+ }
+ return _failed;
}
break;
}
}
+ printDebug("Failed because content-type: text/plain + PASS was not found");
return true;
}
+
+ void printDebug(String msg) {
+ print("");
+ print("DEBUG(infrastructure): $msg");
+ print("DEBUG(infrastructure): cmd.executable: '${command.executable}'");
+ print("DEBUG(infrastructure): cmd.arguments: '${command.arguments}'");
+ print("DEBUG(infrastructure): cmd.environment: '${command.environment}'");
+ print("");
+ }
}
// The static analyzer does not actually execute code, so
« 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