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
diff --git a/test/etc/reference-run-test-classes b/test/etc/reference-run-test-classes
new file mode 100755
index 0000000..94c8050
--- /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 "$@"