From cb99a9ff334be96bba75edb3561cde9ab5306a9d Mon Sep 17 00:00:00 2001
From: Mike Baxley <baxley@chromium.org>
Date: Wed, 12 Jul 2017 15:16:11 +0000
Subject: [PATCH] Add comment to markdown on how to run EarlGrey tests.

EarlGrey tests are run differently than other iOS targets, so this
should be document.

Bug:
Change-Id: I112108008a85f810b7e96fb0241b1c8277ec9ea9
Reviewed-on: https://chromium-review.googlesource.com/567918
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Mike Baxley <baxley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485951}
---
 docs/ios/build_instructions.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/ios/build_instructions.md b/docs/ios/build_instructions.md
index 3a70ff0929b36..f24adbf1402ce 100644
--- a/docs/ios/build_instructions.md
+++ b/docs/ios/build_instructions.md
@@ -234,6 +234,18 @@ command line, you can use `iossim`. For example, to run a debug build of
 $ out/Debug-iphonesimulator/iossim out/Debug-iphonesimulator/Chromium.app
 ```
 
+### Running EarlGrey tests
+
+EarlGrey tests are run differently than other test targets, as there is an
+XCTest bundle that is injected into the target application. Therefore you must
+also pass in the test bundle:
+
+```shell
+$ out/Debug-iphonesimulator/iossim \
+    out/Debug-iphonesimulator/ios_chrome_ui_egtests.app \
+    out/Debug-iphonesimulator/ios_chrome_ui_egtests.app/PlugIns/ios_chrome_ui_egtests_module.xctest
+```
+
 ## Update your checkout
 
 To update an existing checkout, you can run