Add DALVIKVM_FLAGS to test invocation.
Now, only gtest don't use these flags.
Running tests with GC options e.g:
DALVIK_VM="-Xgc:GSS" mm test-art-host-oat
Added a --runtime-option to test/run-test which passes the args to
the test:
test/run-test --runtime-option -Xgc:GSS --runtime-option -XX:UseTLAB 080
Change-Id: Ic928df32cb5aa36d3b0b55456e8b535e82ee9e97
diff --git a/test/etc/host-run-test-jar b/test/etc/host-run-test-jar
index a844e82..d95559f 100755
--- a/test/etc/host-run-test-jar
+++ b/test/etc/host-run-test-jar
@@ -17,7 +17,7 @@
INVOKE_WITH=""
DEV_MODE="n"
QUIET="n"
-COMPILER_OPTIONS=""
+FLAGS=""
while true; do
if [ "x$1" = "x--quiet" ]; then
@@ -69,7 +69,12 @@
elif [ "x$1" = "x-Xcompiler-option" ]; then
shift
option="$1"
- COMPILER_OPTIONS="${COMPILER_OPTIONS} -Xcompiler-option $option"
+ FLAGS="${FLAGS} -Xcompiler-option $option"
+ shift
+ elif [ "x$1" = "x--runtime-option" ]; then
+ shift
+ option="$1"
+ FLAGS="${FLAGS} $option"
shift
elif [ "x$1" = "x--" ]; then
shift
@@ -127,4 +132,4 @@
fi
cd $ANDROID_BUILD_TOP
-$INVOKE_WITH $gdb $exe $gdbargs -XXlib:$LIB $JNI_OPTS $COMPILER_OPTIONS $INT_OPTS $DEBUGGER_OPTS $BOOT_OPT -cp $DEX_LOCATION/$TEST_NAME.jar Main "$@"
+$INVOKE_WITH $gdb $exe $gdbargs -XXlib:$LIB $JNI_OPTS $FLAGS $INT_OPTS $DEBUGGER_OPTS $BOOT_OPT -cp $DEX_LOCATION/$TEST_NAME.jar Main "$@"