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

Skip to content

Avoid using watchOS SDK in CI tests #94190

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 3 commits into from
Dec 1, 2021

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Nov 24, 2021

It's been a pain keeping the watchOS SDKs updated in the Xcode cipd bundles. We've needed to maintain a separate version of the depot_tools mac_toolchain.
Despite this, the newest bundle again had the watch SDK stripped out: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8829667883431985473/+/u/run_ios_app_with_extensions_test/test_stdout

Instead of fixing that bug, let's remove the need for the watchOS SDK in tests. It's currently only used in ios_app_with_extensions_test to validate that an iOS app with a watch companion builds. See #51126 and #64674.

Avoid actually building the watch app by removing the watch app as a build dependency, and stop embedding the watch in the app bundle. Instead, validate via stdout that the tool detects the watch companion, and avoids adding the -sdk flag that used to prevent these kinds of apps from building. Build the app, but do not run on a simulator with a paired watch app.

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.

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. t: xcode "xcodebuild" on iOS and general Xcode project management labels Nov 24, 2021
@jmagman jmagman self-assigned this Nov 24, 2021
@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Nov 24, 2021
@google-cla google-cla bot added the cla: yes label Nov 24, 2021
@@ -18,7 +18,6 @@
49C15B60243E340E0025F804 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C15B5F243E340E0025F804 /* ExtensionDelegate.swift */; };
49C15B62243E340F0025F804 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 49C15B61243E340F0025F804 /* Assets.xcassets */; };
49C15B65243E340F0025F804 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 49C15B64243E340F0025F804 /* Preview Assets.xcassets */; };
49C15B69243E340F0025F804 /* watch.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 49C15B4A243E340B0025F804 /* watch.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
Copy link
Member Author

Choose a reason for hiding this comment

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

Stop embedding the watch.

@@ -531,11 +510,6 @@
target = 49C15B55243E340E0025F804 /* watch Extension */;
targetProxy = 49C15B58243E340E0025F804 /* PBXContainerItemProxy */;
};
49C15B68243E340F0025F804 /* PBXTargetDependency */ = {
Copy link
Member Author

Choose a reason for hiding this comment

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

And remove the watch as an iOS app build dependency.

@@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
Copy link
Member Author

Choose a reason for hiding this comment

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

Xcode gonna Xcode, let it touch this file.

.ci.yaml Outdated
@@ -3244,7 +3244,7 @@ targets:
timeout: 60
properties:
tags: >
["devicelab","ios","mac"]
["devicelab","hostonly","ios","mac"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this run on a Mac_ios target, it'll still run in the devicelab. We'd need to add a separate target, like Mac ios_app_with_extensions_test.

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 @CaseyHillers. I'll just revert this change for now since I don't want to try to figure out how to do that on the .ci.yaml roller failures.

@jmagman jmagman requested review from christopherfujino and removed request for keyonghan November 24, 2021 22:25
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. nit should we leave a TODO or some other breadcrumb noting that this no longer actually uses a device?

@godofredoc
Copy link
Contributor

Thanks for fixing the test, looking forward to run this test on hostonly in both presubmit and postsubmit.

@jmagman
Copy link
Member Author

jmagman commented Nov 29, 2021

LGTM. nit should we leave a TODO or some other breadcrumb noting that this no longer actually uses a device?

Good idea, done.

@jmagman
Copy link
Member Author

jmagman commented Nov 29, 2021

Thanks for fixing the test, looking forward to run this test on hostonly in both presubmit and postsubmit.

Filed #94383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants