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

Xcode 11.3 validation issues #12

Closed
jerrymarino opened this issue Dec 20, 2019 · 1 comment · May be fixed by ios-bazel-users/xctestrunner#1
Closed

Xcode 11.3 validation issues #12

jerrymarino opened this issue Dec 20, 2019 · 1 comment · May be fixed by ios-bazel-users/xctestrunner#1

Comments

@jerrymarino
Copy link
Contributor

When I run xctestrunner on Xcode 11.3 I get the following error:

  File "../xctestrunner/file/downloaded/__main__.py", line 307, in main
  File "../xctestrunner/file/downloaded/__main__.py", line 215, in _SimulatorTest
  File "../xctestrunner/file/downloaded/__main__.py", line 170, in _RunSimulatorTest
  File "../xctestrunner/file/downloaded/__main__/xctestrunner/simulator_control/simulator_util.py", line 314, in CreateNewSimulator
  File "../xctestrunner/file/downloaded/__main__/xctestrunner/simulator_control/simulator_util.py", line 599, in _ValidateSimulatorTypeWithOsVersion
TypeError: float() argument must be a string or a number

When I add 13.3 to the test runner rule, under os_version I get:

xctestrunner.shared.ios_errors.IllegalArgumentError: The max OS version of iPhone 7 is 13.2. But current OS version is 13.3

When I add 13.2 to the test runner rule, under os_version I get:

xctestrunner.shared.ios_errors.IllegalArgumentError: The simulator os version 13.2 is not supported. Supported simulator os versions are [u'13.3'].

After reading the rules_apple documentation, I suspected the os_version means simulator runtime.

It seems like there is confusion between the SDK version Bazel is using, and the runtime version that rules_apple is using. Perhaps this is out of scope of the test runner, as os_version is determined by rules_apple, Bazel.

jerrymarino pushed a commit to jerrymarino/xctestrunner that referenced this issue Dec 20, 2019
Currently the code attempts to validate runtimes, which can get thrown
off in a few scenarios.

By deferring to `xcodebuild` / Apple to validate options, it's easier to
maintain the xctestrunner

Fixes: google#12
jerrymarino pushed a commit to jerrymarino/xctestrunner that referenced this issue Dec 20, 2019
Currently the code attempts to validate runtimes, which can get thrown
off in a few scenarios.

By deferring to `xcodebuild` / Apple to validate options, it's easier to
maintain the xctestrunner

Fixes: google#12
jerrymarino pushed a commit to ios-bazel-users/xctestrunner that referenced this issue Dec 20, 2019
Currently the code attempts to validate runtimes, which can get thrown
off in a few scenarios.

By deferring to `xcodebuild` / Apple to validate options, it's easier to
maintain the xctestrunner

Fixes: google#12
jerrymarino added a commit to ios-bazel-users/xctestrunner that referenced this issue Dec 20, 2019
Currently the code attempts to validate runtimes, which can get thrown
off in a few scenarios.

By deferring to `xcodebuild` / Apple to validate options, it's easier to
maintain the xctestrunner

Fixes: google#12
@albertdai
Copy link
Contributor

Thanks for reporting that.

The root cause is xctestrunner used the command output of xcrun --sdk iphonesimulator --show-sdk-version as the value of max supported simulator version if maxRuntimeVersion is not found in the device type's profile. I will fix that and push release later.

Why we are doing this validation is xcrun simctl create only provides less information if the input runtime or device type is not invalid.

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

Successfully merging a pull request may close this issue.

2 participants