Fail test execution if compiler reported errors. (#16895)

Fixes https://github.com/flutter/flutter/issues/16496
This commit is contained in:
Alexander Aprelev 2018-04-23 17:08:11 -07:00 committed by GitHub
parent de8a53c55b
commit b1330eff5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,11 +151,11 @@ class _Compiler {
request.path);
final String outputPath = compilerOutput?.outputFilename;
// Check if the compiler produced the output. If it failed then
// outputPath would be null. In this case pass null upwards to the
// consumer and shutdown the compiler to avoid reusing compiler
// that might have gotten into a weird state.
if (outputPath == null) {
// In case compiler didn't produce output or reported compilation
// errors, pass [null] upwards to the consumer and shutdown the
// compiler to avoid reusing compiler that might have gotten into
// a weird state.
if (outputPath == null || compilerOutput.errorCount > 0) {
request.result.complete(null);
await shutdown();
} else {