diff options
| author | jeffhao <jeffhao@google.com> | 2011-09-29 17:41:15 -0700 |
|---|---|---|
| committer | jeffhao <jeffhao@google.com> | 2011-09-29 17:41:15 -0700 |
| commit | 5d1ac920fdaef5d4ec8f66bb734488cd9660b024 (patch) | |
| tree | dd372f306ab70f4c86759869b1f74eca62ff6f2b /test/etc/reference-run-test-classes | |
| parent | c31664f3d82e6cd68275a529a8a73f067a52e8be (diff) | |
| download | art-5d1ac920fdaef5d4ec8f66bb734488cd9660b024.tar.gz art-5d1ac920fdaef5d4ec8f66bb734488cd9660b024.tar.bz2 art-5d1ac920fdaef5d4ec8f66bb734488cd9660b024.zip | |
Adding old unit tests to test suite.
These tests are copied straight over. They'll still run, but they're
using the old system.
Change-Id: If494519e52ddf858a9febfc55bdae830468cb3c8
Diffstat (limited to 'test/etc/reference-run-test-classes')
| -rwxr-xr-x | test/etc/reference-run-test-classes | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/etc/reference-run-test-classes b/test/etc/reference-run-test-classes new file mode 100755 index 0000000000..94c805066e --- /dev/null +++ b/test/etc/reference-run-test-classes @@ -0,0 +1,60 @@ +#!/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 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 debugger to connect on localhost:$PORT" + DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y" +fi + +${JAVA} ${DEBUG_OPTS} -ea ${VERIFY_ARG} -classpath classes Main "$@" |
