syncing #1
Open
omnarayan wants to merge 67 commits into
Open
Conversation
set python version to PY2
Fix failure to launch tests with Xcode 11 on pre-iOS 12.2 sims running Swift tests that reference ObjC APIs with no bridged Foundation types
Revert the code structure change in commit aa0e121
- Fix the minSupportedVersion issue for simulator creation. - Allow running arm64 test bundle on arm64e iOS device.
- Check the OS version when passing the Swift5 fallback libraries (required for Xcode 11.4 or later) - Parse the xcresult bundle under Xcode 11 or later. - Remove the Xcode 7 support.
With the python_version attribute, the par binary could not work on macOS 10.14. See #18 for details.
By default when specifying PY2 as the `python_version` the shebang in the produced parfile is `/usr/bin/env python2` which doesn't exist on macOS (unless users have created it). This fix forces the shebang to be `/usr/bin/python2.7` which exists on all recent macOS versions. Once this project is converted to python3, we should change this to `/usr/bin/python3` instead.
Fix python2 interpreter
In all cases, except `xcrun simctl spawn`, we inherit `os.environ` when running commands. This change passes through DEVELOPER_DIR to allow xcrun to select the correct simctl. Without this change, the only way to get the correct simulator selected, is to use xcode-select, which is a system level change, and prone to errors. With this change, one can run env DEVELOPER_DIR=/Applications/Xcode-12.0b1.app/Contents/Developer bazel test --test_env=DEVELOPER_DIR -- //TestTarget and the correct simulator will be created and used.
This outputs the xcresult bundle to a specific place, and stops removing them so they can be consumed after the test
Potential fix for #23
Ignore non diagnosticsRef ids
Pass DEVELOPER_DIR to `xcrun simctl spawn`
Add xcresult bundle collection
Xcode 12.0 compatible change on device testing.
- Expose crash reports from xcresult bundle - Fix a programming error for missing test_log_dir
…t-runner-external-repo Allow running ios test runner as an external repo
This fixes error like the following when running xctestrunner using Python 3.9: ``` AttributeError: module 'plistlib' has no attribute 'readPlist' ``` `plistlib.readPlist` and `plistlib.writePlist` are no longer available since Python 3.9, and their replacements are available since Python 3.4. This change replaces them with wrapper functions to make xctestrunner compatible with a multiple Python versions.
Fix compatibility with Python 3.9
Fix: selected tests are not properly running
On M1 macs running anything with xcrun prints a bunch of these warnings to stderr (FB9089778): ``` objc[35011]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1ffc8ab90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1044502c8). One of the two will be used. Which one is undefined. ``` So capturing this output, and then using it as json, is invalid on M1 machines when this happens. None of the consumers of this function check the output for any error strings, so this change should only improve the other use cases.
…or-output Stop including stderr in simulator output
Fix ProductModuleName with dashes
This project was recently officially marked as deprecated google/subpar#136 rules_apple has supported referencing non-single-file targets for this use case for a few years, so this drop in replacement as a py_binary seems to work fine.
Add initial MODULE.bazel
Remove use of subpar
…py-private-frameworks xcode13 copy private frameworks for xcuitest tests
Fix startup json var spelling
With Bzlmod, on disk ("canonical") repository names are an
implementation detail and can thus no longer be used in Python imports.
Instead, similar to non-Bazel Python projects, the import paths should
be based on actual directories under the repo root - all repo roots are
implicitly added to the Python path by Bazel.
Do not rely on repository imports
Co-authored-by: Richard Levasseur <richardlev@gmail.com>
Unless people are explicitly looking at this, it adds more overhead and increases result bundle size. If someone wants to have this, then perhaps we'd add a flag to have it back but seems like a sensible default
… Xcode 14.3 fixes #57
Seems like Xcode 14.1 and 14.2 require an equals sign here, otherwise they fail with: ``` xcodebuild: error: option -collect-test-diagnostics requires one of two values: on-failure or never ``` Xcode 14.3 seems to have fixed this.
Resolve: #65
Update path to DeviceTypes for Xcode 16.3
When `xcodebuild` times out waiting for tests to start, reboot the simulator and retry up to 3 times before failing. This handles intermittent issues where the simulator gets into a bad state.
This is required for bazel @ HEAD and upcoming 9.x
Add explicit load for python rules
fix xctestrunner test runner for Xcode 16.3 and above
…ator-when-stuck Retry `xcodebuild` by rebooting simulator when stuck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.