Skip to content

Commit

Permalink
Update ios infra docs.
Browse files Browse the repository at this point in the history
In particular, introduce a new way to specify Xcode versions in swarming tasks.

BUG=475693
[email protected]

Change-Id: I87c2fea4fe17bfddf4e1dfb374f993bfa1bfcd19
Reviewed-on: https://chromium-review.googlesource.com/838412
Commit-Queue: Sergey Berezin <[email protected]>
Reviewed-by: Sergey Berezin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#525610}
  • Loading branch information
Sergey Berezin authored and Commit Bot committed Dec 21, 2017
1 parent 956d901 commit 730c59e
Showing 1 changed file with 46 additions and 19 deletions.
65 changes: 46 additions & 19 deletions docs/ios/infra.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ The `ios-device` bot on [chromium.mac] will read its configuration from
{
"app": "ios_chrome_unittests",
"device type": "iPhone 5s",
"os": "10.0",
"xcode version": "8.0"
"os": "11.0",
"xcode build version": "9A235"
}
]
}
Expand Down Expand Up @@ -201,33 +201,35 @@ specific compiled app to run, for example:
{
"app": "ios_chrome_unittests",
"device type": "iPhone 5s",
"os": "10.0",
"xcode version": "8.0"
"os": "11.0",
"xcode build version": "9A235"
}
]
```

This dict says to run `ios_chrome_unittests` on an `iPhone 5s` running iOS
`10.0` using Xcode `8.0`. A test dict may optionally define a list of `test
args`, which are arguments to pass directly to the test on the command line,
and it may define a boolean value `xctest` to indicate whether the test is an
[xctest] \(default if unspecified is `false`\). For example:
`11.0` using Xcode build version `9A235`. A test dict may optionally define a
list of `test args`, which are arguments to pass directly to the test on the
command line, and it may define a boolean value `xctest` to indicate whether the
test is an [xctest] \(default if unspecified is `false`\). For example:

```json
"tests": [
{
"app": "ios_chrome_unittests",
"device type": "iPhone 5s",
"os": "10.0",
"os": "11.0",
"test args": [
"--foo",
"--bar"
],
"xcode version": "8.0"
"xcode build version": "9A235"
},
{
"app": "ios_chrome_integration_egtests",
"device type": "iPhone 5s",
"os": "10.0",
"xcode version": "8.0",
"os": "11.0",
"xcode build version": "9A235",
"xctest": true
}
]
Expand All @@ -245,13 +247,13 @@ subdirectory in the configs directory. For example:
{
"include": "common_tests.json",
"device type": "iPhone 5s",
"os": "10.0",
"xcode version": "8.0"
"os": "11.0",
"xcode build version": "9A235"
}
]
```
This dict says to import the list of tests from the `tests` subdirectory and run
each one on an `iPhone 5s` running iOS `10.0` using Xcode `8.0`. Here's what
each one on an `iPhone 5s` running iOS `11.0` using Xcode `9A235`. Here's what
`common_tests.json` might look like:
```json
"tests": [
Expand All @@ -273,11 +275,14 @@ bot config. For example if `common_tests.json` specifies:
{
"app": "ios_chrome_integration_egtests",
"xctest": true,
"xcode version": "8.0"
"xcode build version": "9A235"
}
]
```
Then the bot config may omit the `xctest` or `xcode version` keys, for example:

Then the bot config may omit the `xctest` or `xcode build version` keys, for
example:

```json
{
"comments": [
Expand All @@ -291,14 +296,36 @@ Then the bot config may omit the `xctest` or `xcode version` keys, for example:
{
"include": "common_tests.json",
"device type": "iPhone 5s",
"os": "10.0"
"os": "11.0"
}
]
}
```
Includes are not recursive, so `common_tests.json` may not itself include any
`include` dicts.

Some keywords such as `xcode build version` can also be set globally per build:

```json
{
"comments": [
"Sample config for a bot."
],
"gn_args": [
"is_debug=true",
"target_cpu=\"x64\""
],
"xcode build version": "9A235",
"tests": [
{
"app": "ios_chrome_integration_egtests",
"device type": "iPhone 5s",
"os": "11.0"
}
]
}
```

### Uploading compiled artifacts from a bot

A bot may be configured to upload compiled artifacts. This is defined by the
Expand Down Expand Up @@ -356,7 +383,7 @@ If `artifact` is a directory, you must specify `"compress": true`.
[simulator]: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/Introduction/Introduction.html
[src/ios/build/bots]: ../../ios/build/bots
[src/ios/build/bots/scripts]: ../../ios/build/bots/scripts
[swarming]: https://github.com/luci/luci-py/tree/master/appengine/swarming
[swarming]: https://chromium.googlesource.com/infra/luci/luci-py/+/master/appengine/swarming/
[swarming server]: https://chromium-swarm.appspot.com
[test runner]: ../../ios/build/bots/scripts/test_runner.py
[tools/build]: https://chromium.googlesource.com/chromium/tools/build
Expand Down

0 comments on commit 730c59e

Please sign in to comment.