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

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

Issue 2576693002: Start re-trying dartk compilations if they crash (Closed)
Patch Set: grep for error message Created 4 years 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 3694509fd0e28ec2b5824a4ea6c16bf24192c0a9..1dd5f96973d36b3b0dd22715ff0dfaf7f205e1dd 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -233,6 +233,8 @@ class KernelCompilationCommand extends CompilationCommand {
: super._(displayName, outputFile, neverSkipCompilation,
bootstrapDependencies, executable, arguments,
environmentOverrides);
+
+ int get maxNumRetries => 1;
}
/// This is just a Pair(String, Map) class with hashCode and operator ==
@@ -2841,6 +2843,31 @@ bool shouldRetryCommand(CommandOutput output) {
}
}
+ final command = output.command;
+
+ // The dartk batch compiler sometimes runs out of memory. In such a case we
+ // will retry running it.
+ if (command is KernelCompilationCommand) {
+ if (output.hasCrashed) {
+ bool containsOutOfMemoryMessage(String line) {
+ return line.contains('Exhausted heap space, trying to allocat');
+ }
+
+ decodeOutput();
+ if (stdout.any(containsOutOfMemoryMessage) ||
+ stderr.any(containsOutOfMemoryMessage)) {
+ return true;
+ }
+ }
+ }
+
+ // We currently rerun dartium tests, see issue 14074.
+ if (command is BrowserTestCommand &&
+ command.retry &&
+ command.browser == 'dartium') {
+ return true;
+ }
+
if (io.Platform.operatingSystem == 'linux') {
decodeOutput();
// No matter which command we ran: If we get failures due to the
@@ -2854,13 +2881,6 @@ bool shouldRetryCommand(CommandOutput output) {
}
}
- // We currently rerun dartium tests, see issue 14074.
- final command = output.command;
- if (command is BrowserTestCommand &&
- command.retry &&
- command.browser == 'dartium') {
- return true;
- }
}
return false;
}
« 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