diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-04-30 15:58:19 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2015-04-30 16:02:58 -0700 |
commit | d792118c493806eeb24a8203f508e6e18fe93bd7 (patch) | |
tree | 4062688e4b0c804601f3ff3f2f962a28e98d5cae /cmds/installd/tests | |
parent | 7a6c5861619ab42f2a34903591ed24a265f68c26 (diff) | |
download | frameworks_native-d792118c493806eeb24a8203f508e6e18fe93bd7.zip frameworks_native-d792118c493806eeb24a8203f508e6e18fe93bd7.tar.gz frameworks_native-d792118c493806eeb24a8203f508e6e18fe93bd7.tar.bz2 |
Offer to move both code and data together.
We now move code under /data/app/com.example when a complete move
is requested. This really only works for new cluster-style installs
that also have native libraries and OAT contained inside.
Teach measuring code about cluster-style installs when measuring
app footprint. Also offer to measure private data space for all
users.
Bug: 19993667, 20275578
Change-Id: I6df7b947cb5cc8a4552f56f4b64a661e8512389f
Diffstat (limited to 'cmds/installd/tests')
-rw-r--r-- | cmds/installd/tests/installd_utils_test.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/cmds/installd/tests/installd_utils_test.cpp b/cmds/installd/tests/installd_utils_test.cpp index 4ce559d..5e397f9 100644 --- a/cmds/installd/tests/installd_utils_test.cpp +++ b/cmds/installd/tests/installd_utils_test.cpp @@ -455,6 +455,13 @@ TEST_F(UtilsTest, CreateDataPath) { create_data_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b")); } +TEST_F(UtilsTest, CreateDataAppPath) { + EXPECT_EQ("/data/app", create_data_app_path(nullptr)); + + EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/app", + create_data_app_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b")); +} + TEST_F(UtilsTest, CreateDataUserPath) { EXPECT_EQ("/data/data", create_data_user_path(nullptr, 0)); EXPECT_EQ("/data/user/10", create_data_user_path(nullptr, 10)); @@ -475,14 +482,21 @@ TEST_F(UtilsTest, CreateDataMediaPath) { create_data_media_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", 10)); } -TEST_F(UtilsTest, CreatePackageDataPath) { - EXPECT_EQ("/data/data/com.example", create_package_data_path(nullptr, "com.example", 0)); - EXPECT_EQ("/data/user/10/com.example", create_package_data_path(nullptr, "com.example", 10)); +TEST_F(UtilsTest, CreateDataAppPackagePath) { + EXPECT_EQ("/data/app/com.example", create_data_app_package_path(nullptr, "com.example")); + + EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/app/com.example", + create_data_app_package_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", "com.example")); +} + +TEST_F(UtilsTest, CreateDataUserPackagePath) { + EXPECT_EQ("/data/data/com.example", create_data_user_package_path(nullptr, 0, "com.example")); + EXPECT_EQ("/data/user/10/com.example", create_data_user_package_path(nullptr, 10, "com.example")); EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/user/0/com.example", - create_package_data_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", "com.example", 0)); + create_data_user_package_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", 0, "com.example")); EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/user/10/com.example", - create_package_data_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", "com.example", 10)); + create_data_user_package_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", 10, "com.example")); } } |