Skip to content
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

[macOS] Add run release test in devicelab #100526

Merged
merged 6 commits into from
Mar 22, 2022

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Mar 22, 2022

Adds a test that invokes flutter run in release mode on macOS desktop,
waits for successful launch and the flutter command list, then sends the
'q' command to quit the running app.

This adds an integration test for #100504.

Issue: #100348 (fix)
Issue: #97978 (partial fix)
Issue: #97977 (partial fix)
Umbrella issue: #60113

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.

@flutter-dashboard flutter-dashboard bot added the team Infra upgrades, team productivity, code health, technical debt. See also team: labels. label Mar 22, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@cbracken cbracken added a: tests "flutter test", flutter_test, or one of our tests platform-mac Building on or for macOS specifically a: desktop Running on desktop c: tech-debt Technical debt, code quality, testing, etc. labels Mar 22, 2022
Adds a test that invokes flutter run in release mode on macOS desktop,
waits for successful launch and the flutter command list, then sends the
'q' command to quit the running app.

This adds an integration test for
flutter#100504.

Issue: flutter#100348
@cbracken
Copy link
Member Author

cbracken commented Mar 22, 2022

Requested a test exemption from @Hixie on Discord.
Exemption reason: This is a test :)

I've filed #100527 to track patching the bot to treat changes under dev/devicelab/bin/tasks as tests.

/// Basic launch test for desktop operating systems.
void main() {
task(() async {
deviceOperatingSystem = DeviceOperatingSystem.macos;
Copy link
Member

Choose a reason for hiding this comment

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

You don't have to do it in this PR but can you also replace this deviceIdOverride hack with your nicer DeviceOperatingSystem.macos fix?

await task(createHotModeTest(deviceIdOverride: 'macos'));

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for spotting this. Looks like we do the same in the Windows/Linux equivalents too. I'll send one patch that does all three and adds the Linux DeviceOperatingSystem if it doesn't exist (the Windows one definitely does).

dev/devicelab/bin/tasks/run_release_test_macos.dart Outdated Show resolved Hide resolved
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.

warning � Missing case clause for 'macos' � dev/devicelab/lib/tasks/perf_tests.dart:585:7 � missing_enum_constant_in_switch
warning � Missing case clause for 'macos' � dev/devicelab/lib/tasks/perf_tests.dart:705:7 � missing_enum_constant_in_switch
warning � Missing case clause for 'macos' � dev/devicelab/lib/tasks/perf_tests.dart:1299:5 � missing_enum_constant_in_switch
  error � The non-nullable local variable 'releaseSizeInBytes' must be assigned before it can be used � dev/devicelab/lib/tasks/perf_tests.dart:1363:29 � not_assigned_potentially_non_nullable_local_variable
warning � Missing case clause for 'macos' � dev/devicelab/lib/tasks/perf_tests.dart:1378:5 � missing_enum_constant_in_switch

Copy link
Contributor

@keyonghan keyonghan left a comment

Choose a reason for hiding this comment

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

Config LGTM with nits.

.ci.yaml Outdated Show resolved Hide resolved
TESTOWNERS Outdated Show resolved Hide resolved
@Hixie
Copy link
Contributor

Hixie commented Mar 22, 2022

test-exempt: is a test

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.

LGTM, thanks!

@cbracken cbracken merged commit 4b81978 into flutter:master Mar 22, 2022
@cbracken cbracken deleted the add-run-release-macos branch March 22, 2022 21:13
@jmagman
Copy link
Member

jmagman commented Mar 22, 2022

cbracken added a commit to cbracken/flutter that referenced this pull request Mar 22, 2022
In the run_release_test_macos integration test that verifies that a
release build of an app can be launched (and quit), xcodebuild from the
Xcode install on the macOS bots emits a few info messages about
Simulator SDK versions that are irrelevant to the functioning of this
test.

Ignore these instead of failing the test if they occur.

Related: flutter#100526

Issue: flutter#100348 (fix)
Issue: flutter#97978 (partial fix)
Issue: flutter#97977 (partial fix)
Umbrella issue: flutter#60113
cbracken added a commit that referenced this pull request Mar 23, 2022
In the run_release_test_macos integration test that verifies that a
release build of an app can be launched (and quit), xcodebuild from the
Xcode install on the macOS bots emits a few info messages about
Simulator SDK versions that are irrelevant to the functioning of this
test.

Ignore these instead of failing the test if they occur.

Related: #100526

Issue: #100348 (fix)
Issue: #97978 (partial fix)
Issue: #97977 (partial fix)
Umbrella issue: #60113
@cbracken
Copy link
Member Author

Workaround for the failure landed in #100591.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: desktop Running on desktop a: tests "flutter test", flutter_test, or one of our tests c: tech-debt Technical debt, code quality, testing, etc. platform-mac Building on or for macOS specifically team Infra upgrades, team productivity, code health, technical debt. See also team: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants