summaryrefslogtreecommitdiffstats
path: root/test/etc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-10-14 09:28:07 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-10-14 09:28:07 +0000
commitb8f2480853aeca1db33ed623b9a9b2648954906e (patch)
treede2cb5a8cb6a614f28c9618b7c999811b89bbe16 /test/etc
parent35274252040670cec78b7abe8322e5dd9b24ee26 (diff)
parent288a4a2bff0ba8840c6fa0dee3c7c9f1934fa530 (diff)
downloadart-b8f2480853aeca1db33ed623b9a9b2648954906e.zip
art-b8f2480853aeca1db33ed623b9a9b2648954906e.tar.gz
art-b8f2480853aeca1db33ed623b9a9b2648954906e.tar.bz2
Merge "Merge reference-run-test-classes and run-test-jar."
Diffstat (limited to 'test/etc')
-rwxr-xr-xtest/etc/reference-run-test-classes61
-rwxr-xr-xtest/etc/run-test-jar21
2 files changed, 17 insertions, 65 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"