Skip to content

syncing #1

Open
omnarayan wants to merge 67 commits into
izinga:masterfrom
google:master
Open

syncing #1
omnarayan wants to merge 67 commits into
izinga:masterfrom
google:master

Conversation

@omnarayan

Copy link
Copy Markdown

No description provided.

woshimaliang and others added 30 commits November 25, 2019 23:23
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.
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
Pass DEVELOPER_DIR to `xcrun simctl spawn`
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.
albertdai and others added 30 commits November 2, 2021 09:29
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
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.
…py-private-frameworks

xcode13 copy private frameworks for xcuitest tests
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
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.
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
fix xctestrunner test runner for Xcode 16.3 and above
…ator-when-stuck

Retry `xcodebuild` by rebooting simulator when stuck
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 this pull request may close these issues.