This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned.
In https://github.com/flutter/engine/pull/54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16.
We did the same for macOS in https://github.com/flutter/engine/pull/54696.
Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is).
Issue: https://github.com/flutter/flutter/issues/154571
This was partially fixed in flutter/flutter#153787, which added just the extension-safe simulator dSYM, but we also bundle:
* arm64 release dSYM
* arm64 release extension-safe dSYM
* arm64_x86_64 simulator dSYM
In a followup engine patch, we'll stop bundling both the regular and extension-safe simulator dSYMs, but this gets the test passing at tip-of-tree.
Issue: https://github.com/flutter/flutter/issues/116493
When attempting to release the Flutter 3.24.1 hotfix, Flutter framework post submits failed due to the following error:
```
âââ¡ERROR #1âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â UNEXPECTED ERROR!
â Exception: Found unexpected binary in cache: /Volumes/Work/s/w/ir/x/w/flutter/bin/cache/artifacts/engine/ios-release/extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/dSYMs/Flutter.framework.dSYM/Contents/Resources/DWARF/Flutter
â #0 verifyExist (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart:150:12)
â <asynchronous suspension>
â #1 verifyCodesignedTestRunner (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart:28:3)
â <asynchronous suspension>
â #2 _runFromList (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/utils.dart:601:5)
â <asynchronous suspension>
â #3 main (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/test.dart:125:5)
â <asynchronous suspension>
â
â The test.dart script should be corrected to catch this error and call foundError().
â Some tests are likely to have been skipped.
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
```
I've updated the tests to include the listed artifact.
### Open questions
1. Is it possible that the test failed only on the first binary?
2. Do we expect a need to add the remainder of the [entitlement changes](c9b9d5780d)?
3. I am under the assumption that the bots pull from master and are not branch specific, is this a correct assumption?
CC @christopherfujino @cbracken
This pull request aims for improved readability, based on issue #146600.
```dart
// before
Set<Color> _distinctVisibleColors() {
final Set<Color> distinctVisibleColors = <Color>{};
if (top.style != BorderStyle.none) {
distinctVisibleColors.add(top.color);
}
if (right.style != BorderStyle.none) {
distinctVisibleColors.add(right.color);
}
if (bottom.style != BorderStyle.none) {
distinctVisibleColors.add(bottom.color);
}
if (left.style != BorderStyle.none) {
distinctVisibleColors.add(left.color);
}
return distinctVisibleColors;
}
// after
Set<Color> _distinctVisibleColors() {
return <Color>{
if (top.style != BorderStyle.none) top.color,
if (right.style != BorderStyle.none) right.color,
if (bottom.style != BorderStyle.none) bottom.color,
if (left.style != BorderStyle.none) left.color,
};
}
```
Most of the repo should be covered in this PR (aside from `flutter_tools/`, since there was a lot going on in there).
Refactor verify codesigned tests in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing verify codesigned tests
Part of https://github.com/flutter/flutter/issues/145482