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

Commit c4a7624

Browse files
author
Emmanuel Garcia
committed
wait for skia gold comparisons
1 parent a9f6f59 commit c4a7624

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

testing/scenario_app/bin/android_integration_tests.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ void main(List<String> args) async {
5555
// On LUCI, the host uploads the screenshots to Skia Gold.
5656
SkiaGoldClient? skiaGoldClient;
5757
late ServerSocket server;
58+
final List<Future<void>> pendingComparisons = <Future<void>>[];
5859
await step('Starting server...', () async {
5960
server = await ServerSocket.bind(InternetAddress.anyIPv4, tcpPort);
6061
stdout.writeln('listening on host ${server.address.address}:${server.port}');
@@ -75,11 +76,12 @@ void main(List<String> args) async {
7576
}
7677
log('wrote ${goldenFile.absolute.path}');
7778
if (isSkiaGoldClientAvailable) {
78-
skiaGoldClient!
79+
final Future<void> comparison = skiaGoldClient!
7980
.addImg(fileName, goldenFile, screenshotSize: fileContent.lengthInBytes)
8081
.catchError((dynamic err) {
8182
panic(<String>['Skia gold comparison failed: ${err.toString()}']);
8283
});
84+
pendingComparisons.add(comparison);
8385
}
8486
});
8587
});
@@ -191,6 +193,10 @@ void main(List<String> args) async {
191193
assert(delivered);
192194
});
193195

196+
await step('Wait for Skia gold comparisons...', () async {
197+
await Future.wait(pendingComparisons);
198+
});
199+
194200
await step('Dumping logcat (Errors only)...', () async {
195201
stdout.write(logcat);
196202
});

0 commit comments

Comments
 (0)