-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs #7430
Conversation
From triage: What's the status of this? Is it still something we plan to deploy? It would definitely be useful for debugging! |
Sorry, I lost track of this. I need to page back in why the tests are failing. |
2a21d04
to
d329678
Compare
This reverts commit d329678.
d329678
to
54003a8
Compare
@stuartmorgan this is ready to review, when you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Is the FLUTTER_LOGS_DIR
support low-level enough that it already applies to this repo, or do we need recipe changes too?
Directory? screenshotDirectory; | ||
if (logsDirectory != null) { | ||
screenshotDirectory = logsDirectory.childDirectory('$exampleName-drive'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directory? screenshotDirectory = logsDirectory?.childDirectory(...);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I copied code that was written before null safety and clumsily migrated (likely by me).
|
||
for (final File target in targets) { | ||
Directory? screenshotDirectory; | ||
if (logsDirectory != null) { | ||
screenshotDirectory = logsDirectory.childDirectory('$exampleName-drive'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exampleName
is a relative posix path; IIRC childDirectory
will interpret that as a path and actually make intervening directories. Is that what we want? If not we should replace /
with _
or something before this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -416,6 +428,7 @@ class DriveExamplesCommand extends PackageLoopingCommand { | |||
required List<File> testFiles, | |||
}) async { | |||
final String enableExperiment = getStringArg(kEnableExperiment); | |||
final Directory? logsDirectory = testFiles.isNotEmpty ? ciLogsDirectory(platform, testFiles.first.fileSystem) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this gated on testFiles
not being empty? (I'd have to check but I wouldn't think this would ever be called with an empty test list.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was just guarding the .first
, I'll remove since I think you're right it's never called with an empty list.
It already applies as of https://flutter-review.googlesource.com/c/recipes/+/39703 You can see it in the env: |
…rive and integration_test runs (flutter/packages#7430)
flutter/packages@7219431...bb5a258 2024-11-06 magder@google.com [ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs (flutter/packages#7430) 2024-11-05 737941+loic-sharma@users.noreply.github.com Remove use_modular_headers! from Podfiles (flutter/packages#7796) 2024-11-05 30872003+misos1@users.noreply.github.com [camera_avfoundation] enable more than 30 fps (flutter/packages#7394) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter from 8591d0c to 29d40f7 (25 revisions) (flutter/packages#8027) 2024-11-05 stuartmorgan@google.com [ci] Add vector_graphics and flutter_svg to autolabeler (flutter/packages#8025) 2024-11-05 alex@mariuti.com [vector_graphics_compiler] wasm compatibility (flutter/packages#8021) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
* main: (1187 commits) [various] Update example app minSdkVersions (flutter#8035) [go_router] Activate leak testing (flutter#7546) [in_app_purchase_storekit] Add restore purchases and receipts (flutter#7964) [interactive_media_ads] Adds remaining methods for internal wrapper of the Android native `BaseManager` (flutter#7943) [google_sign_in/google_identity_services] Clear-up documentation of callbacks in various APIs and uses of those APIs (flutter#8029) [flutter_svg] wasm compatibility (flutter#8014) Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (Part 2) (flutter#8019) Roll Flutter from 29d40f7f6826 to 73546b3b71a7 (20 revisions) (flutter#8028) [ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs (flutter#7430) Remove use_modular_headers! from Podfiles (flutter#7796) [camera_avfoundation] enable more than 30 fps (flutter#7394) Roll Flutter from 8591d0c16a6c to 29d40f7f6826 (25 revisions) (flutter#8027) [ci] Add vector_graphics and flutter_svg to autolabeler (flutter#8025) [vector_graphics_compiler] wasm compatibility (flutter#8021) [vector_graphics*] Relax dependency constraints of vector_graphics, vector_graphics_codec, vector_graphics_compiler, flutter_svg (flutter#8018) [various] Add `missing_code_block_language_in_doc_comment` lint to flutter/packages. (flutter#6473) [various] Update example apps to Kotlin 1.9.0 (flutter#7998) [go_router] add current state getter (flutter#7651) Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (flutter#7968) Roll Flutter from f86b77721524 to 8591d0c16a6c (16 revisions) (flutter#8015) ... # Conflicts: # packages/quick_actions/quick_actions/CHANGELOG.md # packages/quick_actions/quick_actions_ios/CHANGELOG.md # packages/quick_actions/quick_actions_platform_interface/CHANGELOG.md
Native Xcode tests will output a helpful "xcresult" package on failure containing logs, screenshots, and screen recordings. Zip and upload these results when tests fail.
Pass
flutter test --debug-logs-dir
flag to upload logs like Upload DerivedData logs in CI flutter#142643.Pass
flutter drive --screenshot
flag to upload screenshots on timeout like Take drive screenshot on test failure before app is stopped flutter#96973.Example of failing Xcode analyzer build has the zipped xcresult attached as a log.
The unzipped xcresult looks like this in Xcode:
A failing "native test" step build:
Fixes flutter/flutter#144795
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.