Fix oatdump_image_test.

It needs to rune on the core oat file, not an app odex.

Test: oatdump_image_test
Change-Id: I7f6390e21aac794784230b038a4386682ee360d4
diff --git a/oatdump/oatdump_image_test.cc b/oatdump/oatdump_image_test.cc
index de48b04..0a076f0 100644
--- a/oatdump/oatdump_image_test.cc
+++ b/oatdump/oatdump_image_test.cc
@@ -40,13 +40,13 @@
 TEST_F(OatDumpTest, TestOatImage) {
   TEST_DISABLED_FOR_ARM_AND_MIPS();
   std::string error_msg;
-  ASSERT_TRUE(Exec(kDynamic, kModeOat, {}, kListAndCode));
+  ASSERT_TRUE(Exec(kDynamic, kModeCoreOat, {}, kListAndCode));
 }
 TEST_F(OatDumpTest, TestOatImageStatic) {
   TEST_DISABLED_FOR_ARM_AND_MIPS();
   TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
   std::string error_msg;
-  ASSERT_TRUE(Exec(kStatic, kModeOat, {}, kListAndCode));
+  ASSERT_TRUE(Exec(kStatic, kModeCoreOat, {}, kListAndCode));
 }
 
 }  // namespace art
diff --git a/oatdump/oatdump_test.h b/oatdump/oatdump_test.h
index 22c1baa..3ead8de 100644
--- a/oatdump/oatdump_test.h
+++ b/oatdump/oatdump_test.h
@@ -90,6 +90,7 @@
 
   enum Mode {
     kModeOat,
+    kModeCoreOat,
     kModeOatWithBootImage,
     kModeArt,
     kModeSymbolize,
@@ -199,6 +200,8 @@
         exec_argv.push_back("--instruction-set=" + std::string(
             GetInstructionSetString(kRuntimeISA)));
         exec_argv.push_back("--oat-file=" + GetAppOdexName());
+      } else if (mode == kModeCoreOat) {
+        exec_argv.push_back("--oat-file=" + core_oat_location_);
       } else {
         CHECK_EQ(static_cast<size_t>(mode), static_cast<size_t>(kModeOat));
         exec_argv.push_back("--oat-file=" + GetAppOdexName());