Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged

Conversation

christopherfujino
Copy link
Contributor

@christopherfujino christopherfujino commented Oct 27, 2022

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

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 27, 2022
Copy link
Member

@jmagman jmagman left a 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');
Copy link
Member

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.

@christopherfujino christopherfujino changed the title [flutter_tools] allow flutter drive to take screenshots when sent a terminal signal [flutter_tools] allow flutter drive to take screenshots when sent a terminating signal Oct 27, 2022
@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 27, 2022
@christopherfujino
Copy link
Contributor Author

christopherfujino commented Oct 27, 2022

Let me know when you see this happen, curious if it works.

Will do, I'm spending half my week staring at the build dashboard anyway

@auto-submit auto-submit bot merged commit d40f6d1 into flutter:master Oct 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants