anchor.diff:        }
       }
   
  +    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
  
positive.code:       }
      }
  
      // 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;
  }
  
negative.code:       : super._(displayName, outputFile, neverSkipCompilation,
                  bootstrapDependencies, executable, arguments,
                  environmentOverrides);
  
    int get maxNumRetries => 1;
  }
  
  /// This is just a Pair(String, Map) class with hashCode and operator ==
  