Skip to content

Commit 2386fd9

Browse files
authored
Disable post-submit Gold failures entirely (#100332)
1 parent 7f84c55 commit 2386fd9

File tree

2 files changed

+52
-43
lines changed

2 files changed

+52
-43
lines changed

packages/flutter_goldens/test/flutter_goldens_test.dart

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ void main() {
181181
'--commit', '1234',
182182
'--keys-file', '/workDirectory/keys.json',
183183
'--failure-file', '/workDirectory/failures.json',
184-
'--passfail',
184+
// TODO(Piinks): Re-enable once https://github.com/flutter/flutter/issues/100304
185+
// is resolved.
186+
//'--passfail',
185187
],
186188
null,
187189
);
@@ -257,46 +259,46 @@ void main() {
257259
await skiaClient.tryjobInit();
258260
});
259261

260-
test('throws for error state from imgtestAdd', () {
261-
final File goldenFile = fs.file('/workDirectory/temp/golden_file_test.png')
262-
..createSync(recursive: true);
263-
platform = FakePlatform(
264-
environment: <String, String>{
265-
'FLUTTER_ROOT': _kFlutterRoot,
266-
'GOLDCTL' : 'goldctl',
267-
},
268-
operatingSystem: 'macos'
269-
);
270-
271-
skiaClient = SkiaGoldClient(
272-
workDirectory,
273-
fs: fs,
274-
process: process,
275-
platform: platform,
276-
httpClient: fakeHttpClient,
277-
);
278-
279-
const RunInvocation goldctlInvocation = RunInvocation(
280-
<String>[
281-
'goldctl',
282-
'imgtest', 'add',
283-
'--work-dir', '/workDirectory/temp',
284-
'--test-name', 'golden_file_test',
285-
'--png-file', '/workDirectory/temp/golden_file_test.png',
286-
// TODO(Piinks): Re-enable once https://github.com/flutter/flutter/issues/100304
287-
// is resolved.
288-
//'--passfail',
289-
],
290-
null,
291-
);
292-
process.processResults[goldctlInvocation] = ProcessResult(123, 1, 'Expected failure', 'Expected failure');
293-
process.fallbackProcessResult = ProcessResult(123, 1, 'Fallback failure', 'Fallback failure');
294-
295-
expect(
296-
skiaClient.imgtestAdd('golden_file_test', goldenFile),
297-
throwsException,
298-
);
299-
});
262+
// TODO(Piinks): Re-enable once https://github.com/flutter/flutter/issues/100304
263+
// is resolved.
264+
// test('throws for error state from imgtestAdd', () {
265+
// final File goldenFile = fs.file('/workDirectory/temp/golden_file_test.png')
266+
// ..createSync(recursive: true);
267+
// platform = FakePlatform(
268+
// environment: <String, String>{
269+
// 'FLUTTER_ROOT': _kFlutterRoot,
270+
// 'GOLDCTL' : 'goldctl',
271+
// },
272+
// operatingSystem: 'macos'
273+
// );
274+
//
275+
// skiaClient = SkiaGoldClient(
276+
// workDirectory,
277+
// fs: fs,
278+
// process: process,
279+
// platform: platform,
280+
// httpClient: fakeHttpClient,
281+
// );
282+
//
283+
// const RunInvocation goldctlInvocation = RunInvocation(
284+
// <String>[
285+
// 'goldctl',
286+
// 'imgtest', 'add',
287+
// '--work-dir', '/workDirectory/temp',
288+
// '--test-name', 'golden_file_test',
289+
// '--png-file', '/workDirectory/temp/golden_file_test.png',
290+
// '--passfail',
291+
// ],
292+
// null,
293+
// );
294+
// process.processResults[goldctlInvocation] = ProcessResult(123, 1, 'Expected failure', 'Expected failure');
295+
// process.fallbackProcessResult = ProcessResult(123, 1, 'Fallback failure', 'Fallback failure');
296+
//
297+
// expect(
298+
// skiaClient.imgtestAdd('golden_file_test', goldenFile),
299+
// throwsException,
300+
// );
301+
// });
300302

301303
test('correctly inits tryjob for luci', () async {
302304
platform = FakePlatform(

packages/flutter_goldens_client/lib/skia_client.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ class SkiaGoldClient {
144144
'--commit', commitHash,
145145
'--keys-file', keys.path,
146146
'--failure-file', failures.path,
147-
'--passfail',
147+
// TODO(Piinks): Re-enable once https://github.com/flutter/flutter/issues/100304
148+
// is resolved.
149+
//'--passfail',
148150
];
149151

150152
if (imgtestInitCommand.contains(null)) {
@@ -214,7 +216,12 @@ class SkiaGoldClient {
214216
..writeln('Debug information for Gold:')
215217
..writeln('stdout: ${result.stdout}')
216218
..writeln('stderr: ${result.stderr}');
217-
throw Exception(buf.toString());
219+
// Temporarily print logs for issue diagnosis
220+
// ignore: avoid_print
221+
print(buf.toString());
222+
// TODO(Piinks): Re-enable once https://github.com/flutter/flutter/issues/100304
223+
// is resolved.
224+
// throw Exception(buf.toString());
218225
}
219226

220227
return true;

0 commit comments

Comments
 (0)