From c9607e3cebb5fa942fec1d40b4a36a31ca5fb7c7 Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Tue, 8 Feb 2022 10:42:17 +0000 Subject: Revert^3 "Generate a primary boot image for testing." This reverts commit 5791123eeefd60d39b2ef1e62817ec9a1346b2af. Reason for revert: Broke LUCI tests again. Change-Id: I2481f9a147f8ae25930e30c0b717c139fd93fbdb --- runtime/common_runtime_test.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime/common_runtime_test.cc') 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)); -- cgit v1.2.3-59-g8ed1b