Host gtests: Use the apex boot image instead of core.art.
Closely mirror the behaviour of target tests.
Test: m test-art-host-gtest
Bug: 147817558
Change-Id: If9a1d34cef022fa93c9c09c8f31adc26ac71afdc
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index ed8a024..640e182 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -523,22 +523,22 @@
}
std::string CommonRuntimeTestImpl::GetImageDirectory() {
+ std::string prefix;
if (IsHost()) {
const char* host_dir = getenv("ANDROID_HOST_OUT");
CHECK(host_dir != nullptr);
- return std::string(host_dir) + "/framework";
- } else {
- return std::string("/apex/com.android.art/javalib");
+ prefix = host_dir;
}
+ return prefix + kAndroidArtApexDefaultPath + "/javalib";
}
std::string CommonRuntimeTestImpl::GetImageLocation() {
- return GetImageDirectory() + (IsHost() ? "/core.art" : "/boot.art");
+ return GetImageDirectory() + "/boot.art";
}
std::string CommonRuntimeTestImpl::GetSystemImageFile() {
std::string isa = GetInstructionSetString(kRuntimeISA);
- return GetImageDirectory() + "/" + isa + (IsHost() ? "/core.art" : "/boot.art");
+ return GetImageDirectory() + "/" + isa + "/boot.art";
}
void CommonRuntimeTestImpl::EnterTransactionMode() {