1# Testing ART on a model (QEMU or Arm FVP) 2 3This document describes how to test ART on a model - QEMU or the ARM Fixed Virtual Platform. 4 5It covers steps on how to build and run an Android system image targeting a model 6and to use it as a target platform for running ART tests via ADB in chroot mode. The guide 7covers both QEMU and the ARM Fixed Virtual Platform; the setup is very similar. 8 9More information on QEMU and Arm FVP could be found in 10{AOSP}/device/generic/goldfish/fvpbase/README.md. 11 12One would need two AOSP trees for this setup: 13 - a full stable (tagged) tree - to be used to build AOSP image for the model. 14 - android-13.0.0_r12 was tested successfully to run QEMU: 15 ```repo init -u https://android.googlesource.com/platform/manifest -b android-13.0.0_r12``` 16 - a full or minimal tree - the one to be tested as part of ART test run. 17 18## Setting up the QEMU/Arm FVP 19 20Once a full AOSP tree is downloaded, please follow the instructions in 21${AOSP}/device/generic/goldfish/fvpbase/README.md; they should cover: 22 - fetching, configuring and building the model. 23 - building AOSP image for it. 24 - launching the model. 25 26Once the model is started and reachable via adb, ART tests could be run. 27 28Notes: 29 - fvp_mini lunch target should be used as we don't need graphics to run ART tests. 30 - 'Running the image in QEMU' mentions that a special commit should be checked out for QEMU 31 for GUI runs. Actually it is recommended to use it even for non-GUI runs (fvp_mini). 32 33### Running the Arm FVP with SVE enabled 34 35To test SVE on Arm FVP, one extra step is needed when following the instructions above; 36for QEMU run this is not needed. When launching the model some extra cmdline options should 37be provided for 'run_model': 38 39``` 40export SVE_PLUGIN=${MODEL_PATH}/plugins/<os_and_toolchain>/ScalableVectorExtension.so 41$ ./device/generic/goldfish/fvpbase/run_model --plugin ${SVE_PLUGIN} -C SVE.ScalableVectorExtension.veclen=2 42``` 43 44Note: SVE vector length is passed in units of 64-bit blocks. So "2" would stand 45for 128-bit vector length. 46 47## Running ART test 48 49QEMU/FVP behaves as a regular adb device so running ART tests is possible using 50the standard chroot method described in test/README.chroot.md with an additional step, 51described below. A separate AOSP tree (not the one used for the model itself), should 52be used - full or minimal. 53 54Then the regular ART testing routine should be performed; the regular "lunch" 55target ("armv8" and other targets, not "fvp-eng"). 56 57``` 58# Config the test run for QEMU/FVP. 59export ART_TEST_RUN_ON_ARM_FVP=true 60 61# Build, sync ART tests to the model and run, see test/README.chroot.md. 62``` 63 64Note: ART scripts only support one adb device at a time. If you have other adb devices 65connected, use `export ANDROID_SERIAL=localhost:5555` to run scripts on QEMU/FVP." 66