summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r--runtime/common_runtime_test.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index a14d3862ad..e8c8385066 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -99,7 +99,13 @@ void CommonRuntimeTestImpl::SetUp() {
options.push_back(std::make_pair(boot_class_path_string, nullptr));
options.push_back(std::make_pair(boot_class_path_locations_string, nullptr));
if (use_boot_image_) {
- options.emplace_back("-Ximage:" + GetImageLocation(), nullptr);
+ std::string image_location = GetImageLocation();
+ if (!IsHost()) {
+ // On target, the boot image can be outdated due to an ART update. In such case, the profile
+ // will be used for generating a boot image in memory.
+ image_location += "!/apex/com.android.art/etc/boot-image.prof";
+ }
+ options.emplace_back("-Ximage:" + image_location, nullptr);
}
options.push_back(std::make_pair("-Xcheck:jni", nullptr));
options.push_back(std::make_pair(min_heap_string, nullptr));