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

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

Issue 9368008: Additional flakiness reducing changes. Also rerun DRT on false positive tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 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 side-by-side diff with in-line comments
Download patch
Index: tools/testing/dart/test_runner.dart
===================================================================
--- tools/testing/dart/test_runner.dart (revision 4100)
+++ tools/testing/dart/test_runner.dart (working copy)
@@ -162,10 +162,16 @@
List<String> stdout;
List<String> stderr;
Duration time;
+ /**
+ * Set to true if we encounter a condition in the output that indicates we
+ * need to rerun this test.
+ */
+ bool requestRetry;
TestOutput(this.testCase, this.exitCode, this.timedOut, this.stdout,
this.stderr, this.time) {
testCase.output = this;
+ requestRetry = false;
}
String get result() =>
@@ -209,7 +215,8 @@
if (line.contains('Gtk-WARNING **: cannot open display: :99')) {
// 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;
+ requestRetry = true;
+ return true;
}
}
return true;
@@ -247,14 +254,20 @@
process.close();
timeoutTimer.cancel();
if (testCase.output.unexpectedOutput && testCase.configuration['verbose']) {
- print(testCase.output.stdout);
- print(testCase.output.stderr);
+ print(testCase.displayName);
+ for (var line in testCase.output.stderr) print(line);
+ for (var line in testCase.output.stdout) print(line);
}
if (testCase is BrowserTestCase && testCase.output.unexpectedOutput &&
!testCase.isRerun) {
// Selenium tests can be flaky. Try rerunning.
+ testCase.output.requestRetry = true;
+ }
+ if (testCase.output.requestRetry) {
+ testCase.output.requestRetry = false;
+ this.timedOut = false;
testCase.isRerun = true;
Bill Hesse 2012/02/10 09:11:58 testCase.isRerun will be a static type warning. I
- this.timedOut = false;
+ print("Potential flake. Re-running " + testCase.displayName);
this.start();
} else {
testCase.completed();

Powered by Google App Engine
This is Rietveld 408576698