summaryrefslogtreecommitdiff
path: root/libartbase/base/file_utils_test.cc
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2021-09-15 08:56:56 +0000
committer Jiakai Zhang <jiakaiz@google.com> 2021-09-22 05:30:53 +0000
commit7fa70866414df11ef0c9d8eca3e6c23788e8c9d8 (patch)
tree2220f0057661852e53239319156f4161730096b5 /libartbase/base/file_utils_test.cc
parente3e01845d2643916699f1ee15149ed360b14ebeb (diff)
Update ART runtime to recognize artifacts on /system for APEX.
Context: go/location-for-compilation-artifacts-of-apex-jars This change enables ART runtime to use the artifacts generated by aosp/1821984. Bug: 194150908 Test: atest art_standalone_libartbase_tests Test: manual - 1. Patch aosp/1828115. 2. Build a system image and flash it into a device. 3. adb root && adb shell grep "/system/framework/oat" /proc/`adb shell pidof system_server`/maps 4. See "/system/framework/oat/x86_64/apex@..." in the output. Change-Id: I74cb21433d63b1f3ed4d096ab0c86f09bced4b97
Diffstat (limited to 'libartbase/base/file_utils_test.cc')
-rw-r--r--libartbase/base/file_utils_test.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libartbase/base/file_utils_test.cc b/libartbase/base/file_utils_test.cc
index e9093b249c..a0b3325648 100644
--- a/libartbase/base/file_utils_test.cc
+++ b/libartbase/base/file_utils_test.cc
@@ -271,4 +271,13 @@ TEST_F(FileUtilsTest, GetApexDataDalvikCacheFilename) {
CHECK_EQ(vdex_filename, ReplaceFileExtension(art_filename, "vdex"));
}
+TEST_F(FileUtilsTest, GetSystemOdexFilenameForApex) {
+ ScopedUnsetEnvironmentVariable android_root("ANDROID_ROOT");
+
+ const std::string apex_jar = std::string {kAndroidArtApexDefaultPath} + "/javalib/some.jar";
+ EXPECT_EQ(
+ GetAndroidRoot() + "/framework/oat/arm/apex@com.android.art@javalib@some.jar@classes.odex",
+ GetSystemOdexFilenameForApex(apex_jar.c_str(), InstructionSet::kArm));
+}
+
} // namespace art