Small improvements to the documentation.
Add another section to explain that -d and -s arguments to iossim
are optional and may require installing additional components in
Xcode.
Bug: none
Change-Id: Iafb4e61d78be799f56862357e5e02c1d4f785dab
Reviewed-on: https://chromium-review.googlesource.com/897484
Reviewed-by: Eric Noyau <[email protected]>
Commit-Queue: Sylvain Defresne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#533618}
diff --git a/docs/ios/build_instructions.md b/docs/ios/build_instructions.md
index 1d0c76a..8f7a6eb 100644
--- a/docs/ios/build_instructions.md
+++ b/docs/ios/build_instructions.md
@@ -236,7 +236,7 @@
`--gtest_filter=SomeTest.FooBar` should be passed through the `-c` flag:
```shell
-$ out/Debug-iphonesimulator/iossim -d "iPhone 6s" -s 10.0 \
+$ out/Debug-iphonesimulator/iossim \
-c "--gtest_filter=SomeTest.FooBar --gtest_repeat=3" \
out/Debug-iphonesimulator/base_unittests.app
```
@@ -253,6 +253,28 @@
out/Debug-iphonesimulator/ios_chrome_ui_egtests.app/PlugIns/ios_chrome_ui_egtests_module.xctest
```
+### Running on specific simulator
+
+By default, `iossim` will pick an arbitrary simulator to run the tests. If
+you want to run them on a specific simulator, you can use `-d` to pick the
+simulated device and `-s` to select the iOS version.
+
+For example, to run the tests on a simulated iPhone 6s running iOS 10.0,
+you would invoke `iossim` like this.
+
+```shell
+$ out/Debug-iphonesimulator/iossim -d 'iPhone 6s' -s '10.0' \
+ out/Debug-iphonesimulator/base_unittests.app
+```
+
+Please note that by default only a subset of simulator devices are installed
+with Xcode. You may have to install additional simulators in Xcode (or even
+an older version of Xcode) to be able to run on a specific configuration.
+
+Go to "Preferences > Components" tab in Xcode to install other simulator images
+(this is the location the setting is in Xcode 9.2; it may be different in other
+version of the tool).
+
## Update your checkout
To update an existing checkout, you can run