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

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

Issue 2987393002: enable batch mode for dartdevc tests, also fix status so ddc bots pass (Closed)
Patch Set: fix Created 3 years, 4 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 | « tests/lib_strong/lib_strong.status ('k') | tools/testing/dart/compiler_configuration.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/command_output.dart
diff --git a/tools/testing/dart/command_output.dart b/tools/testing/dart/command_output.dart
index 02d61fd9b7ac1f32581d8d8203f5bd5a67d131ce..db0c4a0759ad243b6a583e224e4c85211df85612 100644
--- a/tools/testing/dart/command_output.dart
+++ b/tools/testing/dart/command_output.dart
@@ -698,6 +698,37 @@ class CompilationCommandOutput extends CommandOutput {
}
}
+class DevCompilerCommandOutput extends CommandOutput {
+ DevCompilerCommandOutput(
+ Command command,
+ int exitCode,
+ bool timedOut,
+ List<int> stdout,
+ List<int> stderr,
+ Duration time,
+ bool compilationSkipped,
+ int pid)
+ : super(command, exitCode, timedOut, stdout, stderr, time,
+ compilationSkipped, pid);
+
+ Expectation result(TestCase testCase) {
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+
+ // Handle errors / missing errors
+ if (testCase.expectCompileError) {
+ return exitCode == 0
+ ? Expectation.missingCompileTimeError
+ : Expectation.pass;
+ }
+
+ // TODO(jmesserly): should we handle `testCase.isNegative`? Analyzer does
+ // not, so this behavior is chosen to match.
+ return exitCode == 0 ? Expectation.pass : Expectation.compileTimeError;
+ }
+}
+
class KernelCompilationCommandOutput extends CompilationCommandOutput {
KernelCompilationCommandOutput(
Command command,
@@ -804,6 +835,9 @@ CommandOutput createCommandOutput(Command command, int exitCode, bool timedOut,
command.displayName == 'app_jit') {
return new VMCommandOutput(
command, exitCode, timedOut, stdout, stderr, time, pid);
+ } else if (command.displayName == 'dartdevc') {
+ return new DevCompilerCommandOutput(command, exitCode, timedOut, stdout,
+ stderr, time, compilationSkipped, pid);
}
return new CompilationCommandOutput(
command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
« no previous file with comments | « tests/lib_strong/lib_strong.status ('k') | tools/testing/dart/compiler_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698