File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed
lib/src/build_system/targets
test/general.shard/build_system/targets Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -181,12 +181,16 @@ class ShaderCompiler {
181
181
final Process impellercProcess = await _processManager.start (cmd);
182
182
final int code = await impellercProcess.exitCode;
183
183
if (code != 0 ) {
184
- _logger.printTrace (await utf8.decodeStream (impellercProcess.stdout));
185
- _logger.printError (await utf8.decodeStream (impellercProcess.stderr));
184
+ final String stdout = await utf8.decodeStream (impellercProcess.stdout);
185
+ final String stderr = await utf8.decodeStream (impellercProcess.stderr);
186
+ _logger.printTrace (stdout);
187
+ _logger.printError (stderr);
186
188
if (fatal) {
187
189
throw ShaderCompilerException ._(
188
190
'Shader compilation of "${input .path }" to "$outputPath " '
189
- 'failed with exit code $code .' ,
191
+ 'failed with exit code $code .\n '
192
+ 'impellerc stdout:\n $stdout \n '
193
+ 'impellerc stderr:\n $stderr ' ,
190
194
);
191
195
}
192
196
return false ;
Original file line number Diff line number Diff line change @@ -199,6 +199,8 @@ void main() {
199
199
'--input-type=frag' ,
200
200
'--include=$fragDir ' ,
201
201
],
202
+ stdout: 'impellerc stdout' ,
203
+ stderr: 'impellerc stderr' ,
202
204
exitCode: 1 ,
203
205
),
204
206
]);
@@ -209,14 +211,18 @@ void main() {
209
211
artifacts: artifacts,
210
212
);
211
213
212
- await expectLater (
213
- () => shaderCompiler.compileShader (
214
+ try {
215
+ await shaderCompiler.compileShader (
214
216
input: fileSystem.file (notFragPath),
215
217
outputPath: outputPath,
216
218
target: ShaderTarget .sksl,
217
- ),
218
- throwsA (isA <ShaderCompilerException >()),
219
- );
219
+ );
220
+ fail ('unreachable' );
221
+ } on ShaderCompilerException catch (e) {
222
+ expect (e.toString (), contains ('impellerc stdout:\n impellerc stdout' ));
223
+ expect (e.toString (), contains ('impellerc stderr:\n impellerc stderr' ));
224
+ }
225
+
220
226
expect (fileSystem.file (outputPath).existsSync (), false );
221
227
});
222
228
You can’t perform that action at this time.
0 commit comments