Merge "We replace -d with -O recently, but not uniformly." into dalvik-dev
diff --git a/test/etc/push-and-run-test-jar b/test/etc/push-and-run-test-jar
index e606ef3..19d5988 100755
--- a/test/etc/push-and-run-test-jar
+++ b/test/etc/push-and-run-test-jar
@@ -23,7 +23,7 @@
 DEBUG="n"
 VERIFY="y"
 OPTIMIZE="y"
-ZYGOTE="n"
+ZYGOTE=""
 QUIET="n"
 DEV_MODE="n"
 INVOKE_WITH=""
@@ -39,7 +39,7 @@
         DEBUG="y"
         shift
     elif [ "x$1" = "x--zygote" ]; then
-        ZYGOTE="y"
+        ZYGOTE="--zygote"
         msg "Spawning from zygote"
         shift
     elif [ "x$1" = "x--dev" ]; then
@@ -66,7 +66,7 @@
     fi
 done
 
-if [ "$ZYGOTE" = "n" ]; then
+if [ "$ZYGOTE" = "" ]; then
     if [ "$OPTIMIZE" = "y" ]; then
         if [ "$VERIFY" = "y" ]; then
             DEX_OPTIMIZE="-Xdexopt:verified"
@@ -116,18 +116,12 @@
   #   jdb -attach localhost:12345
 fi
 
-if [ "$ZYGOTE" = "y" ]; then
-  adb shell cd /data \; dvz -classpath $TEST_NAME.jar Main "$@"
-else
-  cmdline="cd /data; $INVOKE_WITH $OATEXEC ${DEX_DEBUG} -Xjnigreflimit:256 \
-      -Ximage:/data/art-test/core.art \
-      -cp /data/art-test/$TEST_NAME.jar \
-      Main"
-  #cmdline="cd /data; dalvikvm $DEX_VERIFY $DEX_OPTIMIZE $DEX_DEBUG \
-  #     -cp test.jar -Xint:${INTERP} -ea Main"
-  if [ "$DEV_MODE" = "y" ]; then
-    echo $cmdline "$@"
-  fi
-
-  adb shell $cmdline "$@"
+cmdline="cd /data; $INVOKE_WITH $OATEXEC $DEX_DEBUG $ZYGOTE -Xjnigreflimit:256 \
+    -Ximage:/data/art-test/core.art \
+    -cp /data/art-test/$TEST_NAME.jar \
+    Main"
+if [ "$DEV_MODE" = "y" ]; then
+  echo $cmdline "$@"
 fi
+
+adb shell $cmdline "$@"
diff --git a/test/run-all-tests b/test/run-all-tests
index bd5eea3..18ffa17 100755
--- a/test/run-all-tests
+++ b/test/run-all-tests
@@ -40,8 +40,8 @@
     if [ "x$1" = "x--host" ]; then
         run_args="${run_args} --host"
         shift
-    elif [ "x$1" = "x--reference" ]; then
-        run_args="${run_args} --reference"
+    elif [ "x$1" = "x--jvm" ]; then
+        run_args="${run_args} --jvm"
         shift
     elif [ "x$1" = "x--debug" ]; then
         run_args="${run_args} --debug"
@@ -84,8 +84,8 @@
         echo "  $prog [options]  Run all tests with the given options."
         echo "  Options are all passed to run-test; refer to that for " \
              "further documentation:"
-        echo "    --debug --dev --host --no-optimize --no-verify"
-        echo "    --reference --update --valgrind --zygote"
+        echo "    --debug --dev --host --jvm --no-optimize --no-verify"
+        echo "    -O --update --valgrind --zygote"
     ) 1>&2
     exit 1
 fi
diff --git a/test/run-test b/test/run-test
index 50e45bb..0c31c31 100755
--- a/test/run-test
+++ b/test/run-test
@@ -54,11 +54,11 @@
     if [ "x$1" = "x--host" ]; then
         RUN="${progdir}/etc/host-run-test-jar"
         shift
-    elif [ "x$1" = "x--reference" ]; then
+    elif [ "x$1" = "x--jvm" ]; then
         RUN="${progdir}/etc/reference-run-test-classes"
         shift
-    elif [ "x$1" = "x-d" ]; then
-        run_args="${run_args} -d"
+    elif [ "x$1" = "x-O" ]; then
+        run_args="${run_args} -O"
         shift
     elif [ "x$1" = "x--debug" ]; then
         run_args="${run_args} --debug"
@@ -142,6 +142,7 @@
         echo '  Omitting the test name or specifying "-" will use the' \
              "current directory."
         echo "  Runtime Options:"
+        echo "    -O             Run oatexec rather than oatexecd (off by default)."
         echo "    --debug        Wait for a debugger to attach."
         #echo "    --gdb          Run under gdb; incompatible with some tests."
         echo "    --no-verify    Turn off verification (on by default)."
@@ -152,7 +153,7 @@
         echo "                   other runtime options are ignored."
         echo "    --host         Use the host-mode virtual machine."
         echo "    --valgrind     Use valgrind when running locally."
-        echo "    --reference    Use a host-local reference virtual machine."
+        echo "    --jvm          Use a host-local RI virtual machine."
     ) 1>&2
     exit 1
 fi