ART: Change prebuild run-test setup

Prebuild was meant to check whether the runtime correctly loads
pre-existing oat files. With the advent of patching images, this
has actually been reduced to "does the runtime run self-patchoat"

We cannot produce a prebuilt oat file that does not have to be
patched, as the runtime will patch the image when it starts.

There are two options to make this more meaningful:

* In the prebuild setting, first run patchoat to explicitly create
  a valid dalvik-cache.

* Change the dex2oat output to be the odex file, which can be
  patched like a regular file.

This change shows the latter approach.

Change-Id: I5234e10d78f7ea6c7ad8598db67d3fad8ba42b67
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index ac6ef8c..278f540 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -381,14 +381,15 @@
 mkdir_cmdline="mkdir -p ${DEX_LOCATION}/dalvik-cache/$ISA"
-app_image="--app-image-file=$DEX_LOCATION/dalvik-cache/$ISA/$(echo $DEX_LOCATION/$TEST_NAME.jar/ | cut -d/ -f 2- | sed "s:/:@:g")"
 if [ "$PREBUILD" = "y" ]; then
+  mkdir_cmdline="${mkdir_cmdline} && mkdir -p ${DEX_LOCATION}/oat/$ISA"
   dex2oat_cmdline="$INVOKE_WITH $ANDROID_ROOT/bin/dex2oatd \
                       $COMPILE_FLAGS \
                       --boot-image=${BOOT_IMAGE} \
                       --dex-file=$DEX_LOCATION/$TEST_NAME.jar \
-                      --oat-file=$DEX_LOCATION/dalvik-cache/$ISA/$(echo $DEX_LOCATION/$TEST_NAME.jar/classes.dex | cut -d/ -f 2- | sed "s:/:@:g") \
+                      --oat-file=$DEX_LOCATION/oat/$ISA/$TEST_NAME.odex \
                       ${app_image} \
   if [ "x$INSTRUCTION_SET_FEATURES" != "x" ] ; then