Fix execution with RI in ART `run-test-jar` script.
When using the RI, make sure that:
- ART-specific (runtime) flags are not used;
- `adb` is not invoked (via `art/test/utils/get-device-isa`).
Test: art/test/run-test --jvm 001-HelloWorld
Test: art/test/testrunner/testrunner.py --host --optimizing
Bug: 147817558
Bug: 121117762
Change-Id: I2d9a8d250f60c2fa14cb0afc0906dd4efe2a1793
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 2c65ea2..97bb396 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -113,7 +113,7 @@
# Let the compiler and runtime know that we are running tests.
COMPILE_FLAGS="${COMPILE_FLAGS} --compile-art-test"
-FLAGS="${FLAGS} -Xcompiler-option --compile-art-test"
+ANDROID_FLAGS="${ANDROID_FLAGS} -Xcompiler-option --compile-art-test"
while true; do
if [ "x$1" = "x--quiet" ]; then
@@ -508,7 +508,7 @@
CHROOT_DEX_LOCATION="$CHROOT$DEX_LOCATION"
# If running on device, determine the ISA of the device.
-if [ "$HOST" = "n" ]; then
+if [ "$HOST" = "n" -a "$USE_JVM" = "n" ]; then
ISA=$("$ANDROID_BUILD_TOP/art/test/utils/get-device-isa" "$GET_DEVICE_ISA_BITNESS_FLAG")
fi