Add description of building test dependencies to README.md
Issues like b/154161162 indicate that this requirement is non-obvious
and should be highlighted.
Bug: 154161162
Change-Id: Iee856e0a683088294f6d2a64cce50fc660d2cd1f
Test: None
diff --git a/test/README.md b/test/README.md
index 8a4b589..c7e5a3f 100644
--- a/test/README.md
+++ b/test/README.md
@@ -92,18 +92,44 @@
$ art/test.py -h
```
+## Building tests
+
+In general all tests require some dependencies to be built before they can be run.
+In general you can pass the `--build-dependencies` flag (also available as short
+option -b) to `art/test.py` program to automatically build required dependencies.
+One can also directly use the various `test-art-...-dependencies` targets listed
+below.
+
## Running all tests on the build host
```sh
+$ # Build test files
+$ m test-art-host-run-test-dependencies
+$ # Run the tests
$ art/test.py --host
```
+Or:
+
+```
+$ art/test.py -b --host
+```
+
## Running all tests on the target device
```sh
+$ # Build test files
+$ m test-art-target-run-test-dependencies
+$ # Run the tests
$ art/test.py --target
```
+Or:
+
+```
+$ art/test.py -b --target
+```
+
## Running all gtests on the build host
```sh
@@ -119,9 +145,17 @@
## Running all run-tests on the build host
```sh
+$ # Build test files
+$ m test-art-host-run-test-dependencies
$ art/test.py --host -r
```
+Or:
+
+```
+$ art/test.py -b --host -r
+```
+
## Running all run-tests on the target device
```sh
@@ -131,9 +165,18 @@
## Running one run-test on the build host
```sh
+$ # Build test files
+$ m test-art-host-run-test-dependencies
+$ # Run the tests
$ art/test.py --host -r -t 001-HelloWorld
```
+Or:
+
+```
+$ art/test.py -b --host -r -t 001-HelloWorld
+```
+
## Running one run-test on the target device
```sh