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

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: 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..02f402c506a5db9b002b2e5397fff7e0586c4dc7 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,7 @@ 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} remains)");
Mads Ager (google) 2012/02/28 17:06:56 Long line.
antonm 2012/02/28 17:20:43 Done. I am using + for now as "aa" "bb" syntax do
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