summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2022-02-08 10:42:17 +0000
committer Jiakai Zhang <jiakaiz@google.com> 2022-02-08 11:07:17 +0000
commitc9607e3cebb5fa942fec1d40b4a36a31ca5fb7c7 (patch)
tree470bf375a5538f1b2857e70ada334a71bf05d914 /runtime/common_runtime_test.cc
parentbe9e23a61983cd4a3aa7c20f2e96d56333d92cf7 (diff)
Revert^3 "Generate a primary boot image for testing."
This reverts commit 5791123eeefd60d39b2ef1e62817ec9a1346b2af. Reason for revert: Broke LUCI tests again. Change-Id: I2481f9a147f8ae25930e30c0b717c139fd93fbdb
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));