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

[fix] Update simctl command in device_manager.rb [21893] #21894

Merged
merged 2 commits into from Feb 29, 2024

Conversation

dnedrow
Copy link
Contributor

@dnedrow dnedrow commented Feb 26, 2024

Resolves 21893

When run_tests executes, it attempts to get a list of installed runtimes in json format. This fails with Xcode 14.n and 15.n. The reason is that the following command is used to get the list of runtimes: xcrun simctl list runtimes -j.

I'm unsure if this worked in older versions of Xcode, but it no longer does. The output modifier must come BEFORE runtimes in the command, e.g. xcrun simctl list -j runtimes

Running rspec via bundle exec just gives the following Output:

No examples found.


Finished in 0.00026 seconds (files took 0.04599 seconds to load)
0 examples, 0 failures

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass.
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

run_tests was failing do to bad simctl command.

Description

Simply moved the -j (JSON) option to immediately after the list directive.

Testing Steps

When run_tests executes, it attempts to get a list of installed runtimes in json format. This fails with Xcode 14.n and 15.n.
The reason is that the following command is used to get the list of runtimes:
`xcrun simctl list runtimes -j`.
I'm unsure if this worked in older versions of Xcode, but it no longer does. The output modifier must come BEFORE `runtimes` in the command, e.g. `xcrun simctl list -j runtimes`
chore: Update device_manager tests

Location of `-j` has changed when using `simctl list runtimes`
@dnedrow dnedrow marked this pull request as ready for review February 27, 2024 15:35
@lacostej lacostej changed the title 21893 Update simctl command in device_manager.rb [fix] Update simctl command in device_manager.rb [21893] Feb 27, 2024
@lacostej lacostej merged commit 7fe135c into fastlane:master Feb 29, 2024
3 checks passed
@lacostej
Copy link
Collaborator

Merged. Thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fastlane run_tests fails when attempting to get runtimes
2 participants