Add support for option `--android-runtime-root` to ART run-test scripts.
Also have testrunner.py honor `ART_TEST_ANDROID_RUNTIME_ROOT` and pass
its value via `--android-runtime-root` to art/test/run-test (for
target testing).
These changes are needed for the interim period where
- we have code running on the ART Buildbot using
`ANDROID_RUNTIME_ROOT` to locate files on device (namely ICU code
looking for ICU .dat prebuilt files); and
- the Runtime APEX is not (yet) available on all environments where
ART is running (namely the ART Buildbot).
Test: Rely on the ART Buildbot.
Bug: 121117762
Bug: 119293618
Bug: 113373927
Change-Id: I83bbb2442f15ed82eee3369dad1d249227bb3442
diff --git a/test/run-test b/test/run-test
index 83c726e..67bcce7 100755
--- a/test/run-test
+++ b/test/run-test
@@ -386,6 +386,15 @@
android_root="$1"
run_args="${run_args} --android-root $1"
shift
+ elif [ "x$1" = "x--android-runtime-root" ]; then
+ shift
+ if [ "x$1" = "x" ]; then
+ echo "$0 missing argument to --android-runtime-root" 1>&2
+ usage="yes"
+ break
+ fi
+ run_args="${run_args} --android-runtime-root $1"
+ shift
elif [ "x$1" = "x--update" ]; then
update_mode="yes"
shift
@@ -758,6 +767,9 @@
echo " --never-clean Keep the test files even if the test succeeds."
echo " --chroot [newroot] Run with root directory set to newroot."
echo " --android-root [path] The path on target for the android root. (/system by default)."
+ echo " --android-runtime-root [path]"
+ echo " The path on target for the Android Runtime root."
+ echo " (/apex/com.android.runtime by default)."
echo " --dex2oat-swap Use a dex2oat swap file."
echo " --instruction-set-features [string]"
echo " Set instruction-set-features for compilation."