-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Take screenshot when drive fails #78822
Conversation
expect(logger.statusText, contains('Screenshot written to drive_screenshots/drive_01.png')); | ||
}); | ||
|
||
testWithoutContext('drive --screenshot errors but does not fail if screenshot fails', () async { |
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 tried for awhile to get DriveCommand
working with the CommandRunner
to actually run the test, but I eventually gave up after I couldn't pass in --no-pub
flutter/packages/flutter_tools/lib/src/commands/drive.dart
Lines 142 to 145 in ce318b7
// `pub` must always be run due to the test script running from source, | |
// even if an application binary is used. | |
@override | |
bool get shouldRunPub => true; |
throw UnsupportedError('Attempted to invoke pub during test.'); |
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.
hmm, I think this is wrong. We should always run pub by default, unless we're asked not to.
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.
Past Jonah says #70136
67fdedf
to
7627fdb
Compare
Let's ignore the Cirrus failures for now as long as the LUCI equivalents pass #78678. |
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
I can take a look at the pub issue tomorrow
(yeessssss.... #66153 (comment)) |
@@ -292,6 +293,8 @@ TaskFunction createStackSizeTest() { | |||
'--driver', testDriver, | |||
'-d', | |||
deviceId, | |||
'--screenshot', | |||
hostAgent.dumpDirectory.path, |
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 ran into issue where local environment does not have FLUTTER_LOGS_DIR
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.
Add
--screenshot
option toflutter drive
to take a screenshot when the tests fail. This should make it easier to debug timeout failures like #78805. Since it doesn't rely on VM'sscreenshot
this should also help us detect that the app launched but is just sitting on a white screen because the engine failed to initialize.Adopt in devicelab tests to point to the directory that gets uploaded via LUCI recipe.
I purposely regressed #75665 locally, and lo:
I wouldn't have had to SSH into the host to figure out the device was sideways.