Fix test for no-prebuild.

Test: 693-vdex-inmem-loader-evict
Change-Id: I79345171051f858c5d79d67247cbde41ed436808
diff --git a/test/693-vdex-inmem-loader-evict/src/Main.java b/test/693-vdex-inmem-loader-evict/src/Main.java
index e06f232..231e852 100644
--- a/test/693-vdex-inmem-loader-evict/src/Main.java
+++ b/test/693-vdex-inmem-loader-evict/src/Main.java
@@ -33,6 +33,11 @@
       return;
     }
 
+    if (!hasOatFile()) {
+      // We only generate vdex files if the oat directories are created.
+      return;
+    }
+
     setProcessDataDir(DEX_LOCATION);
 
     final int maxCacheSize = getVdexCacheSize();
@@ -63,6 +68,7 @@
   }
 
   private static native boolean isDebuggable();
+  private static native boolean hasOatFile();
   private static native int setTargetSdkVersion(int version);
   private static native void setProcessDataDir(String path);
   private static native void waitForVerifier();