Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wait for skia gold comparisons
  • Loading branch information
Emmanuel Garcia committed Jun 3, 2022
commit 48b3b9b8d21c168cd73610d752606ae83b702d4c
8 changes: 7 additions & 1 deletion testing/scenario_app/bin/android_integration_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void main(List<String> args) async {
// On LUCI, the host uploads the screenshots to Skia Gold.
SkiaGoldClient? skiaGoldClient;
late ServerSocket server;
final List<Future<void>> pendingComparisons = <Future<void>>[];
await step('Starting server...', () async {
server = await ServerSocket.bind(InternetAddress.anyIPv4, tcpPort);
stdout.writeln('listening on host ${server.address.address}:${server.port}');
Expand All @@ -75,11 +76,12 @@ void main(List<String> args) async {
}
log('wrote ${goldenFile.absolute.path}');
if (isSkiaGoldClientAvailable) {
skiaGoldClient!
final Future<void> comparison = skiaGoldClient!
.addImg(fileName, goldenFile, screenshotSize: fileContent.lengthInBytes)
.catchError((dynamic err) {
panic(<String>['Skia gold comparison failed: ${err.toString()}']);
});
pendingComparisons.add(comparison);
}
});
});
Expand Down Expand Up @@ -191,6 +193,10 @@ void main(List<String> args) async {
assert(delivered);
});

await step('Wait for Skia gold comparisons...', () async {
await Future.wait(pendingComparisons);
});

await step('Dumping logcat (Errors only)...', () async {
stdout.write(logcat);
});
Expand Down