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

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

Issue 9501003: Do not go infinite loop if test fails constantly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressing Mads' comments 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
« 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 7eddd3f73339cc679b4a7c3b8698506c21829d74..2d6fcde52d209063bb4873c8d64df9b5ed4c011d 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -124,7 +124,7 @@ class BrowserTestCase extends TestCase {
* Indicates the number of potential retries remaining, to compensate for
* flaky browser tests.
*/
- bool numRetries;
+ int numRetries;
BrowserTestCase(displayName,
this.compilerPath,
@@ -216,7 +216,9 @@ class TestOutput {
line.contains('Failed to run command. return code=1')) {
// If we get the X server error, or DRT crashes with a core dump, retry
// the test.
- requestRetry = true;
+ if (testCase.dynamic.numRetries > 0) {
+ requestRetry = true;
+ }
return true;
}
}
@@ -283,7 +285,9 @@ class RunningProcess {
testCase.output.requestRetry = false;
this.timedOut = false;
testCase.dynamic.numRetries--;
- print("Potential flake. Re-running " + testCase.displayName);
+ print("Potential flake. " +
+ "Re-running ${testCase.displayName} " +
+ "(${testCase.dynamic.numRetries} attempt(s) remains)");
this.start();
} else {
testCase.completed();
« 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