1#How to run these tests 2 3This folder contains .json configs that serve as examples for 4launches of multi-device configurations, where one or more of 5those devices are a local instance. Some tests mix these local 6instances with remotely fetched ones as well, but in all cases 7at least one local image is needed. Hence some steps are needed 8to create these artifacts locally. 9 10In particular - there needs to be the following artifacts local: 11 121. A folder containing Cuttlefish 'host tools' - 13which contains the `cvd` binary (among others) that are 14used to launch the instances. 15 162. A device image folder stored locally, which will be run within 17the VMs created, effectively demonstrating that the local instance 18was successfully created. 19 20There are a few recommended ways to set up these folders, feel 21free to use whichever method works best for your use case. 22 23## Option 1: Modify the configs manually after local AOSP build 24 251. Check out a copy of the AOSP source tree from the repository and 26branch desired 272. Follow standard process to build AOSP. When complete the AOSP build 28process will put binaries into the `[AOSP checkout folder]`/out 293. Modify the .json files to point to correct folders. In particular there 30are two paths that need to be replaced. The first is `/tmp/vsoc_x86_64`, which 31will be the folder containing the disk images for the local instance to be launched. 32This will be located under the AOSP `out` folder at a path similair to: 33`/out/target/product/vsoc_x86_64`. One way to get this folder is via: 34`env | grep ANDROID_PRODUCT_OUT=`. 35The 2nd path to update is listed in the .json files as `/tmp/linux-x86`, and 36this is a path containing the Cuttlefish host tools binaries. This can 37also be obtained after an AOSP build, while in the same shell, via: 38`env | grep ANDROID_HOST_OUT=`. 394. Tests can now be executed via `cvd load host/cvd_test_configs/local_mixed_1.json` 40(ensuring you give the correct path and changing the filename 41to whichever test you'd like to execute). 42 43## Option 2: Use included `gen_local_configs.sh` script 44 451. Check out AOSP tree and run a build. While still in the same shell that executed 46the build, move to step 2. (Or use `lunch` to init the environment in a shell.) 472. Included in the cuttlefish tree is a script, which when executed will 48copy all included .json files to /tmp, and update the configs with paths matching your 49current AOSP local environment. Run this script while in the folder containing this README, 50via `../../../tools/testing/gen_local_configs.sh`. 513. Tests can now be executed via `cvd load /tmp/local_mixed_1.json` (changing the filename 52to whichever test you'd like to execute). The Android image used within the tests (as the 53local VM) is the same one which you have just compiled. 54