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

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

Issue 9426005: Don't retry browser tests if the bot is pretty red. Also, retry properly all (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
« no previous file with comments | « tools/testing/dart/test_progress.dart ('k') | 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
===================================================================
--- tools/testing/dart/test_runner.dart (revision 4362)
+++ tools/testing/dart/test_runner.dart (working copy)
@@ -200,16 +200,6 @@
if (testCase is !BrowserTestCase) return (exitCode != 0 && !hasCrashed);
// Browser case:
- // Browser tests fail unless stdout contains
- // 'Content-Type: text/plain\nPASS'.
- String previous_line = '';
- for (String line in stdout) {
- if (line == 'PASS' && previous_line == 'Content-Type: text/plain') {
- return (exitCode != 0 && !hasCrashed);
Emily Fortuna 2012/02/17 19:34:24 Sometimes when DRT crashes with a memory dump, and
Siggi Cherem (dart-lang) 2012/02/17 19:51:38 I thought in that case we wouldn't have PASS in th
Emily Fortuna 2012/02/17 21:03:03 Sometimes it does, and sometimes it doesn't when D
- }
- previous_line = line;
- }
-
// If the browser test failed, it may have been because DumpRenderTree
// and the virtual framebuffer X server didn't hook up, or DRT crashed with
// a core dump.
@@ -222,6 +212,17 @@
return true;
}
}
+
+ // Browser tests fail unless stdout contains
+ // 'Content-Type: text/plain\nPASS'.
+ String previous_line = '';
+ for (String line in stdout) {
+ if (line == 'PASS' && previous_line == 'Content-Type: text/plain') {
+ return (exitCode != 0 && !hasCrashed);
+ }
+ previous_line = line;
+ }
+
return true;
}
@@ -248,8 +249,9 @@
List<String> stdout;
List<String> stderr;
List<Function> handlers;
+ bool allowRetries;
- RunningProcess(TestCase this.testCase);
+ RunningProcess(TestCase this.testCase, bool this.allowRetries);
Siggi Cherem (dart-lang) 2012/02/17 19:51:38 I think when using this.xxx our style is to omit t
Emily Fortuna 2012/02/17 21:03:03 Done.
void exitHandler(int exitCode) {
new TestOutput(testCase, exitCode, timedOut, stdout,
@@ -261,7 +263,7 @@
for (var line in testCase.output.stderr) print(line);
for (var line in testCase.output.stdout) print(line);
}
- if (testCase.configuration['component'] == 'webdriver' &&
+ if (allowRetries && testCase.configuration['component'] == 'webdriver' &&
testCase.output.unexpectedOutput && testCase.numRetries > 0) {
// Selenium tests can be flaky. Try rerunning.
testCase.output.requestRetry = true;
@@ -704,7 +706,11 @@
_ensureDartcBatchRunnersStarted(test.executablePath);
_getDartcBatchRunnerProcess().startTest(test);
} else {
- new RunningProcess(test).start();
+ // If we've failed more than four tests, a lot of tests are likely
Siggi Cherem (dart-lang) 2012/02/17 19:51:38 When is numFailedTest incremented? I thought that
Emily Fortuna 2012/02/17 21:03:03 The progress counter keeps track of the *actual* f
Emily Fortuna 2012/02/17 21:04:45 *Edit to last paragraph: Yes, numFailedTests is n
+ // broken. Don't continue to retry running tests if our tree is already
+ // red. At this point rerunning to test for flakes takes more time than
+ // it's worth.
+ new RunningProcess(test, _progress.numFailedTests < 5).start();
Emily Fortuna 2012/02/17 19:34:24 Magic number... no me gusta :-(
Siggi Cherem (dart-lang) 2012/02/17 19:51:38 maybe we can do != 0?
}
_numProcesses++;
}
« no previous file with comments | « tools/testing/dart/test_progress.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698