Skip to content

ci: enable swift_tests (Swift library unit tests) #383

@rebello95

Description

@rebello95

The swift_tests test job is currently disabled due to issues starting the iOS simulators on CI. This means that our Swift library unit tests are not currently being run on CI.

Multiple attempts were made to re-enable these tests in commits on the following PRs:

The underlying issue seems to be that the CI machines are in a bad state and are unable to start simulators due to the following error:

2019-08-21 20:09:16,432 Creating a new simulator:
Name: New-iPhone X-12.2
 OS: iOS 12.2
Type: iPhone X
2019-08-21 20:09:16,818 Created new simulator 878B1941-91B0-4504-86E1-81A57328E327.
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=165):
Invalid device state
2019-08-21 20:09:17,129 Deleting simulator 878B1941-91B0-4504-86E1-81A57328E327 asynchronously.
2019-08-21 20:09:17,134 Done.

My current theory is that the fact that the CI machines have multiple versions of Xcode on them (and that 10.3.0 is not the default but is what our .bazelrc uses) is causing issues.

I've tried quite a few different things to fix this issue:

  • Custom Bazel test runner to work around Default iOS tests to passed versions bazelbuild/rules_apple#549
  • Forcing Xcode 10.2.1 in only the swift_tests job (same error as above)
  • Running on different device simulators and OSes
  • Manually starting up a simulator using ios-sim from npm before running the tests
  • Running xcode-select --switch to force-select a version of Xcode
  • Reinstalling simulators using xcversion simulators --install

Ideally we can find a way to re-enable these without waiting for 10.3.0 to become the default.

cc @keith @cafedomingo @junr03 @goaway

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions