Fix image_test for SMALL_ART

Bug: 9618388
Change-Id: I8b13ef2bfec77479a60271d9b9f5379c9d7a2490
diff --git a/compiler/image_test.cc b/compiler/image_test.cc
index 08c32c2..6464a4c 100644
--- a/compiler/image_test.cc
+++ b/compiler/image_test.cc
@@ -51,6 +51,9 @@
       //       We shouldn't need to do this.
       runtime_->SetCompilerFilter(Runtime::kInterpretOnly);
 #endif
+      for (const DexFile* dex_file : class_linker->GetBootClassPath()) {
+        dex_file->EnableWrite();
+      }
       compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), timings);
 
       ScopedObjectAccess soa(Thread::Current());