Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 4ea0148

Browse files
authored
Add a throw statement for imgtestAdd non 0 exit codes. (#50829)
Thanks @Piinks for noticing.
1 parent bf5c003 commit 4ea0148

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

testing/skia_gold_client/lib/skia_gold_client.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,20 @@ class SkiaGoldClient {
257257
final ProcessResult result = await _runCommand(imgtestCommand);
258258

259259
if (result.exitCode != 0) {
260-
// We do not want to throw for non-zero exit codes here, as an intentional
261-
// change or new golden file test expect non-zero exit codes. Logging here
262-
// is meant to inform when an unexpected result occurs.
263-
print('goldctl imgtest add stdout: ${result.stdout}');
264-
print('goldctl imgtest add stderr: ${result.stderr}');
260+
final StringBuffer buf = StringBuffer()
261+
..writeln('Skia Gold received an unapproved image in post-submit ')
262+
..writeln('testing. Golden file images in flutter/engine are triaged ')
263+
..writeln('in pre-submit during code review for the given PR.')
264+
..writeln()
265+
..writeln('Visit https://flutter-engine-gold.skia.org/ to view and approve ')
266+
..writeln('the image(s), or revert the associated change. For more ')
267+
..writeln('information, visit the wiki: ')
268+
..writeln('https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter')
269+
..writeln()
270+
..writeln('Debug information for Gold --------------------------------')
271+
..writeln('stdout: ${result.stdout}')
272+
..writeln('stderr: ${result.stderr}');
273+
throw Exception(buf.toString());
265274
} else if (verbose) {
266275
print('stdout:\n${result.stdout}');
267276
print('stderr:\n${result.stderr}');

0 commit comments

Comments
 (0)