| 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);
|
|
|