-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Run tests on either macOS 12 or macOS 13 #5089
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
Changes from all commits
e76652d
6fb70b7
eef0513
9d8d5c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Copyright 2013 The Flutter Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
set -e | ||
|
||
# The name here must match create_simulator.sh | ||
readonly DEVICE_NAME=Flutter-iPhone | ||
|
||
# Allow boot to fail; cases like "Unable to boot device in current state: Booted" | ||
# exit with failure. | ||
xcrun simctl boot "$DEVICE_NAME" || : | ||
echo -e "" | ||
xcrun simctl list |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,18 @@ readonly DEVICE_NAME=Flutter-iPhone | |
readonly DEVICE=com.apple.CoreSimulator.SimDeviceType.iPhone-14 | ||
readonly OS=com.apple.CoreSimulator.SimRuntime.iOS-16-4 | ||
|
||
xcrun simctl list | ||
# Delete any existing devices named Flutter-iPhone. Having more than one may | ||
# cause issues when builds target the device. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reference, here's an example of this problem in action: https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20custom_package_tests%20master/7040/overview Unclear if it's a problem new to macOS 13 |
||
echo -e "Deleting any existing devices names $DEVICE_NAME..." | ||
RESULT=0 | ||
while [[ $RESULT == 0 ]]; do | ||
xcrun simctl delete "$DEVICE_NAME" || RESULT=1 | ||
if [ $RESULT == 0 ]; then | ||
echo -e "Deleted $DEVICE_NAME" | ||
fi | ||
done | ||
echo -e "" | ||
|
||
echo -e "\nCreating $DEVICE_NAME $DEVICE $OS ...\n" | ||
xcrun simctl create "$DEVICE_NAME" "$DEVICE" "$OS" | xargs xcrun simctl boot | ||
xcrun simctl list |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,12 @@ tasks: | |
args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"] | ||
- name: native test | ||
script: script/tool_runner.sh | ||
args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 14,OS=latest"] | ||
# Simulator name must match name in create_simulator.sh | ||
args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=Flutter-iPhone,OS=16.4"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we upgrade, there's no guarantee that there will be an iPhone 14 simulator. Better to use the simulator we create in the "create simulator" step (same for the pigeon test_suites.dart). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pigeon's There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, so I updated Pigeon's FYI couple reasons I think that's the best approach:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also btw, I ran
vashworth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: boot simulator | ||
# Ensure simulator is still booted | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While I was testing, sometimes the simulator would shutdown after "native test" and before "drive examples" See https://luci-milo.appspot.com/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_4%20master/7162/overview for example (I added logs to drive example, where you'll see the Flutter-iPhone simulator is shutdown) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's really weird. Is there any indication of why it's shutting down? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the "native test" step shows the simulator is booted and works as expected. There's no logs that indicate it would be triggered to be shutdown. It also doesn't seem to happen every time. |
||
script: .ci/scripts/boot_simulator.sh | ||
infra_step: true # Note infra steps failing prevents "always" from running. | ||
- name: drive examples | ||
# `drive-examples` contains integration tests, which changes the UI of the application. | ||
# This UI change sometimes affects `xctest`. | ||
|
Uh oh!
There was an error while loading. Please reload this page.