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

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

Issue 9190011: Fix flaky tests on chromium buildbot, by adding a correct fix to test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 370022f073c0a9601b26b2a025dd5793a9df1aa5..3db97e59ecf58ee6f963e18c9208c16d6a3db912 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -151,21 +151,22 @@ class TestOutput {
bool get hasTimedOut() => timedOut;
bool get didFail() {
- if (exitCode != 0 && !hasCrashed) return true;
+ if (testCase is !BrowserTestCase) return (exitCode != 0 && !hasCrashed);
+ // Browser case:
// Browser tests fail unless stdout contains
// 'Content-Type: text/plain\nPASS'.
- if (testCase is !BrowserTestCase) return false;
String previous_line = '';
for (String line in stdout) {
if (line == 'PASS' && previous_line == 'Content-Type: text/plain') {
- return false;
+ return (exitCode != 0 && !hasCrashed);
}
// If the browser test failed, it may have been because DumpRenderTree
- // and the virtual framebuffer X server didn't hook up. So return false
- // if we get the X server error. Issue dart:1135 is filed.
+ // and the virtual framebuffer X server didn't hook up.
if (line.contains('Gtk-WARNING **: cannot open display: :99')) {
Siggi Cherem (dart-lang) 2012/01/11 20:55:15 I just saw the failure here: http://chromegw.corp.
- return false;
+ // If we get the X server error, return the expected value
+ // We cannot restart the test from here. Issue dart:1135 is filed.
+ return testCase.isNegative;
Siggi Cherem (dart-lang) 2012/01/11 18:40:15 could we print a warning to stdout too?
}
previous_line = line;
}
« 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