Re-enable Gold post-submit fail state (#101528)
This commit is contained in:
parent
012952ba47
commit
324e6d9d4e
@ -257,46 +257,44 @@ void main() {
|
||||
await skiaClient.tryjobInit();
|
||||
});
|
||||
|
||||
// TODO(Piinks): Re-enable once https://github.com/flutter/flutter/issues/100304
|
||||
// is resolved.
|
||||
// test('throws for error state from imgtestAdd', () {
|
||||
// final File goldenFile = fs.file('/workDirectory/temp/golden_file_test.png')
|
||||
// ..createSync(recursive: true);
|
||||
// platform = FakePlatform(
|
||||
// environment: <String, String>{
|
||||
// 'FLUTTER_ROOT': _kFlutterRoot,
|
||||
// 'GOLDCTL' : 'goldctl',
|
||||
// },
|
||||
// operatingSystem: 'macos'
|
||||
// );
|
||||
//
|
||||
// skiaClient = SkiaGoldClient(
|
||||
// workDirectory,
|
||||
// fs: fs,
|
||||
// process: process,
|
||||
// platform: platform,
|
||||
// httpClient: fakeHttpClient,
|
||||
// );
|
||||
//
|
||||
// const RunInvocation goldctlInvocation = RunInvocation(
|
||||
// <String>[
|
||||
// 'goldctl',
|
||||
// 'imgtest', 'add',
|
||||
// '--work-dir', '/workDirectory/temp',
|
||||
// '--test-name', 'golden_file_test',
|
||||
// '--png-file', '/workDirectory/temp/golden_file_test.png',
|
||||
// '--passfail',
|
||||
// ],
|
||||
// null,
|
||||
// );
|
||||
// process.processResults[goldctlInvocation] = ProcessResult(123, 1, 'Expected failure', 'Expected failure');
|
||||
// process.fallbackProcessResult = ProcessResult(123, 1, 'Fallback failure', 'Fallback failure');
|
||||
//
|
||||
// expect(
|
||||
// skiaClient.imgtestAdd('golden_file_test', goldenFile),
|
||||
// throwsException,
|
||||
// );
|
||||
// });
|
||||
test('throws for error state from imgtestAdd', () {
|
||||
final File goldenFile = fs.file('/workDirectory/temp/golden_file_test.png')
|
||||
..createSync(recursive: true);
|
||||
platform = FakePlatform(
|
||||
environment: <String, String>{
|
||||
'FLUTTER_ROOT': _kFlutterRoot,
|
||||
'GOLDCTL' : 'goldctl',
|
||||
},
|
||||
operatingSystem: 'macos'
|
||||
);
|
||||
|
||||
skiaClient = SkiaGoldClient(
|
||||
workDirectory,
|
||||
fs: fs,
|
||||
process: process,
|
||||
platform: platform,
|
||||
httpClient: fakeHttpClient,
|
||||
);
|
||||
|
||||
const RunInvocation goldctlInvocation = RunInvocation(
|
||||
<String>[
|
||||
'goldctl',
|
||||
'imgtest', 'add',
|
||||
'--work-dir', '/workDirectory/temp',
|
||||
'--test-name', 'golden_file_test',
|
||||
'--png-file', '/workDirectory/temp/golden_file_test.png',
|
||||
'--passfail',
|
||||
],
|
||||
null,
|
||||
);
|
||||
process.processResults[goldctlInvocation] = ProcessResult(123, 1, 'Expected failure', 'Expected failure');
|
||||
process.fallbackProcessResult = ProcessResult(123, 1, 'Fallback failure', 'Fallback failure');
|
||||
|
||||
expect(
|
||||
skiaClient.imgtestAdd('golden_file_test', goldenFile),
|
||||
throwsException,
|
||||
);
|
||||
});
|
||||
|
||||
test('correctly inits tryjob for luci', () async {
|
||||
platform = FakePlatform(
|
||||
|
@ -212,12 +212,7 @@ class SkiaGoldClient {
|
||||
..writeln('Debug information for Gold:')
|
||||
..writeln('stdout: ${result.stdout}')
|
||||
..writeln('stderr: ${result.stderr}');
|
||||
// Temporarily print logs for issue diagnosis
|
||||
// ignore: avoid_print
|
||||
print(buf.toString());
|
||||
// TODO(Piinks): Re-enable once https://github.com/flutter/flutter/issues/100304
|
||||
// is resolved.
|
||||
// throw Exception(buf.toString());
|
||||
throw Exception(buf.toString());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user