-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[flutter_tools] allow flutter drive to take screenshots when sent a terminating signal #114118
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
[flutter_tools] allow flutter drive to take screenshots when sent a terminating signal #114118
Conversation
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.
Let me know when you see this happen, curious if it works.
@@ -286,6 +295,13 @@ class DriveCommand extends RunCommandBase { | |||
androidEmulator: boolArgDeprecated('android-emulator'), | |||
profileMemory: stringArgDeprecated('profile-memory'), | |||
); | |||
// If the test is sent a signal, take a screenshot before exiting | |||
final Map<ProcessSignal, Object> screenshotTokens = _registerScreenshotCallbacks((ProcessSignal signal) async { | |||
_logger!.printError('Caught $signal'); |
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'll let you merge this and will rebase #114111 on top.
Will do, I'm spending half my week staring at the build dashboard anyway |
…sent a terminating signal (flutter/flutter#114118)
…sent a terminating signal (flutter/flutter#114118)
…sent a terminating signal (flutter/flutter#114118)
…sent a terminating signal (flutter/flutter#114118)
…sent a terminating signal (flutter/flutter#114118)
When LUCI times out a step after 30 minutes, it first sends a signal (SIGTERM on *nix, SIGINT I think on Windows) to the last running process. If the CI build is running
flutter drive --screenshot=/path/to/screenshot ...
, we should try to take a screenshot when this signal is sent.Should add debugging for #114025