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

Skip to content

Terminate simulator app on "q" #113581

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
merged 7 commits into from
Oct 18, 2022
Merged

Terminate simulator app on "q" #113581

merged 7 commits into from
Oct 18, 2022

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Oct 17, 2022

Usage: simctl terminate <device> <app bundle identifier>

Add a new non-benchmark hot_mode_dev_cycle_ios_simulator test to validate hot reload works on an iOS simulator.

Fixes #113580

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Oct 17, 2022
@jmagman jmagman self-assigned this Oct 17, 2022
@@ -901,6 +901,24 @@ Dec 20 17:04:32 md32-11-vm1 Another App[88374]: Ignore this text'''
throwsToolExit(message: r'Unable to launch'),
);
});

testWithoutContext('.stopApp() handles exceptions', () async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to test that the app is actually terminated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean in an integration test? Let me see if I can get something working...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a check to the hot reload tests.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman jmagman requested a review from keyonghan as a code owner October 18, 2022 17:45
.ci.yaml Outdated
@@ -1791,8 +1791,6 @@ targets:
tags: >
["devicelab", "android", "linux"]
task_name: hot_mode_dev_cycle_linux__benchmark
runIf:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not going to check these .ci.yaml changes in, I just want to see if the desktop tests pass in presubmit.

@@ -257,3 +269,19 @@ Future<Map<String, dynamic>> captureReloadData(
benchmarkFile.deleteSync();
return result;
}

Future<void> _checkAppRunning(bool shouldBeRunning) async {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something tells me this will be a flake factory... Will delete if that starts happening.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Oct 18, 2022
TESTOWNERS Outdated
@@ -168,6 +168,7 @@
/dev/devicelab/bin/tasks/fullscreen_textfield_perf_impeller_ios__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/fullscreen_textfield_perf_ios__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/hello_world_ios__compile.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/hot_mode_dev_cycle_ios_simulator.dart @zanderso @flutter/tool
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zanderso added this new test to validate hot reload on iOS simulators. I matched the owner to the other hot_mode_dev_cycle benchmarks but I'm happy to own if you prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If/when the new test flakes, I'd just be routing it to you anyway, so cutting out the middleman and putting yourself as the owner seems like it would make sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If any of the hot reload tests start flaking on checking the running processes they will be routed to me, but any actual issues with the hot reloading will be routed to you 🙂
Fortunately we know where to find each other.

@christopherfujino
Copy link
Contributor

Still LGTM

@jmagman
Copy link
Member Author

jmagman commented Oct 26, 2022

Partial revert at #114083

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 c: contributor-productivity Team-specific productivity, code health, technical debt. platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stopping iOS simulator app with q during run does not stop the app
4 participants