Fix oat_file_assistant_test for devices with low memory.

We saw that the dex2oat invocation can fail on some threads, due to low
memory killer just killin the process.

Test: oat_file_assistant_test
Change-Id: Ie7bb5b07387606e9a3f47cec80c5ff1d83a36996
diff --git a/runtime/oat_file_assistant_test.cc b/runtime/oat_file_assistant_test.cc
index 901bbc4..5a29978 100644
--- a/runtime/oat_file_assistant_test.cc
+++ b/runtime/oat_file_assistant_test.cc
@@ -1175,7 +1175,13 @@
       args.push_back("--dex-file=" + dex_location_);
       args.push_back("--oat-file=" + oat_location_);
       std::string error_msg;
-      ASSERT_TRUE(DexoptTest::Dex2Oat(args, &error_msg)) << error_msg;
+      if (kIsTargetBuild) {
+        // Don't check whether dex2oat is successful: given we're running kNumThreads in
+        // parallel, low memory killer might just kill some of the dex2oat invocations.
+        DexoptTest::Dex2Oat(args, &error_msg);
+      } else {
+        ASSERT_TRUE(DexoptTest::Dex2Oat(args, &error_msg)) << error_msg;
+      }
     }
 
     dex_files = Runtime::Current()->GetOatFileManager().OpenDexFilesFromOat(