diff options
-rwxr-xr-x | test/etc/reference-run-test-classes | 61 | ||||
-rwxr-xr-x | test/etc/run-test-jar | 21 | ||||
-rwxr-xr-x | test/run-test | 2 |
3 files changed, 18 insertions, 66 deletions
diff --git a/test/etc/reference-run-test-classes b/test/etc/reference-run-test-classes deleted file mode 100755 index 6f10f5a..0000000 --- a/test/etc/reference-run-test-classes +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -# -# Run the code in a classes directory on a host-local reference virtual -# machine. The jar should contain a top-level class named Main to run. -# -# Options: -# --quiet -- don't chatter -# --debug -- wait for debugger to attach -# --no-verify -- turn off verification (on by default) -# --dev -- development mode - -msg() { - if [ "$QUIET" = "n" ]; then - echo "$@" - fi -} - -DEBUG="n" -QUIET="n" -VERIFY="y" - -while true; do - if [ "x$1" = "x--quiet" ]; then - QUIET="y" - shift - elif [ "x$1" = "x--debug" ]; then - DEBUG="y" - shift - elif [ "x$1" = "x--no-verify" ]; then - VERIFY="n" - shift - elif [ "x$1" = "x--dev" ]; then - # not used; ignore - shift - elif [ "x$1" = "x--" ]; then - shift - break - elif expr "x$1" : "x--" >/dev/null 2>&1; then - echo "unknown $0 option: $1" 1>&2 - exit 1 - else - break - fi -done - -if [ "$VERIFY" = "y" ]; then - VERIFY_ARG="-Xverify:all" - msg "Performing verification" -else - VERIFY_ARG="-Xverify:none" - msg "Skipping verification" -fi - -if [ "$DEBUG" = "y" ]; then - PORT=8000 - msg "Waiting for jdb to connect:" - msg " jdb -attach localhost:$PORT" - DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y" -fi - -${JAVA} ${DEBUG_OPTS} ${VERIFY_ARG} -classpath classes Main "$@" diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index 9a32ec7..9fed158 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -32,6 +32,7 @@ PREBUILD="y" QUIET="n" RELOCATE="y" USE_GDB="n" +USE_JVM="n" VERIFY="y" ZYGOTE="" MAIN="" @@ -105,6 +106,9 @@ while true; do elif [ "x$1" = "x--interpreter" ]; then INTERPRETER="y" shift + elif [ "x$1" = "x--jvm" ]; then + USE_JVM="y" + shift elif [ "x$1" = "x--invoke-with" ]; then shift if [ "x$1" = "x" ]; then @@ -161,19 +165,17 @@ if [ "$ZYGOTE" = "" ]; then if [ "$VERIFY" = "y" ]; then DEX_VERIFY="" + JVM_VERIFY_ARG="-Xverify:all" msg "Performing verification" else DEX_VERIFY="-Xverify:none" + JVM_VERIFY_ARG="-Xverify:none" msg "Skipping verification" fi fi msg "------------------------------" -if [ "$HAVE_IMAGE" = "n" ]; then - BOOT_OPT="-Ximage:/system/non-existant/core.art" -fi - if [ "$DEBUGGER" = "y" ]; then # Use this instead for ddms and connect by running 'ddms': # DEBUGGER_OPTS="-agentlib:jdwp=transport=dt_android_adb,server=y,suspend=y" @@ -188,6 +190,17 @@ if [ "$DEBUGGER" = "y" ]; then DEBUGGER_OPTS="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y" fi +if [ "$USE_JVM" = "y" ]; then + ${JAVA} ${DEBUGGER_OPTS} ${JVM_VERIFY_ARG} -classpath classes $MAIN "$@" + exit +fi + + +if [ "$HAVE_IMAGE" = "n" ]; then + BOOT_OPT="-Ximage:/system/non-existant/core.art" +fi + + if [ "$USE_GDB" = "y" ]; then if [ "$HOST" = "n" ]; then GDB="$GDB_SERVER :5039" diff --git a/test/run-test b/test/run-test index 3e98d6d..62c701f 100755 --- a/test/run-test +++ b/test/run-test @@ -106,6 +106,7 @@ while true; do runtime="jvm" prebuild_mode="no" NEED_DEX="false" + run_args="${run_args} --jvm" shift elif [ "x$1" = "x-O" ]; then lib="libart.so" @@ -270,7 +271,6 @@ function guess_arch_name() { if [ "$target_mode" = "no" ]; then if [ "$runtime" = "jvm" ]; then - RUN="${progdir}/etc/reference-run-test-classes" if [ "$prebuild_mode" = "yes" ]; then echo "--prebuild with --jvm is unsupported"; exit 1; |