Revert "Revert "Use compiler filter to determine oat file status.""
This reverts commit 845e5064580bd37ad5014f7aa0d078be7265464d.
Add an option to change what OatFileManager considers up-to-date.
In our tests we're allowed to write to the dalvik-cache, so it
cannot be kSpeed.
(cherry picked from commit 29d38e77c553c6cf71fc4dafe2d22b4e3f814872)
Bug: 27689078
Change-Id: I6274188610f31dcd9d086fc080b2be93afae5a6b
diff --git a/test/117-nopatchoat/nopatchoat.cc b/test/117-nopatchoat/nopatchoat.cc
index 82e1fc8..0dab400 100644
--- a/test/117-nopatchoat/nopatchoat.cc
+++ b/test/117-nopatchoat/nopatchoat.cc
@@ -54,7 +54,8 @@
}
const OatFile* oat_file = oat_dex_file->GetOatFile();
- return !oat_file->IsPic() && !oat_file->IsExtractOnly();
+ return !oat_file->IsPic()
+ && CompilerFilter::IsCompilationEnabled(oat_file->GetCompilerFilter());
}
};
diff --git a/test/run-test b/test/run-test
index 55989c6..01464cd 100755
--- a/test/run-test
+++ b/test/run-test
@@ -241,11 +241,11 @@
run_args="${run_args} --zygote"
shift
elif [ "x$1" = "x--interpreter" ]; then
- run_args="${run_args} --interpreter"
+ run_args="${run_args} --interpreter --runtime-option -XOatFileManagerCompilerFilter:verify-at-runtime"
image_suffix="-interpreter"
shift
elif [ "x$1" = "x--jit" ]; then
- run_args="${run_args} --jit"
+ run_args="${run_args} --jit --runtime-option -XOatFileManagerCompilerFilter:verify-at-runtime"
image_suffix="-jit"
shift
elif [ "x$1" = "x--optimizing" ]; then
@@ -253,10 +253,10 @@
image_suffix="-optimizing"
shift
elif [ "x$1" = "x--no-verify" ]; then
- run_args="${run_args} --no-verify"
+ run_args="${run_args} --no-verify --runtime-option -XOatFileManagerCompilerFilter:verify-none"
shift
elif [ "x$1" = "x--verify-soft-fail" ]; then
- run_args="${run_args} --verify-soft-fail"
+ run_args="${run_args} --verify-soft-fail --runtime-option -XOatFileManagerCompilerFilter:verify-at-runtime"
image_suffix="-interp-ac"
shift
elif [ "x$1" = "x--no-optimize" ]; then