From daaacea96ebfc55b47f44240e2082c820c8eb234 Mon Sep 17 00:00:00 2001 From: Raman Tenneti Date: Thu, 13 Feb 2020 02:50:42 +0000 Subject: Revert "Force package installation with FUSE unless the package stores on device" This reverts commit 5e6c4e9a91674826bf11cab604250b41a9326fd8. Reason for revert: BUG: 149432069 - build failure on git_qt-qpr1-dev-plus-aosp on docs. 'otautil/roots.h' file not found is the error. Forrest run: https://android-build.googleplex.com/builds/forrest/run/L85900000460577420 Change-Id: I35119c2334895aa0ef4ed71b3ddd08f280c0c031 Merged-In: I35119c2334895aa0ef4ed71b3ddd08f280c0c031 --- tests/Android.bp | 1 - tests/unit/install_test.cpp | 28 ---------------------------- 2 files changed, 29 deletions(-) (limited to 'tests') diff --git a/tests/Android.bp b/tests/Android.bp index 640bb042e..e49d966c7 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -93,7 +93,6 @@ librecovery_static_libs = [ "libbinderthreadstate", "liblp", "libtinyxml2", - "libc++fs", ] cc_test { diff --git a/tests/unit/install_test.cpp b/tests/unit/install_test.cpp index ecf1c9a61..370fbdcc5 100644 --- a/tests/unit/install_test.cpp +++ b/tests/unit/install_test.cpp @@ -34,7 +34,6 @@ #include "install/install.h" #include "install/wipe_device.h" #include "otautil/paths.h" -#include "otautil/roots.h" #include "private/setup_commands.h" static void BuildZipArchive(const std::map& file_map, int fd, @@ -514,30 +513,3 @@ TEST(InstallTest, CheckPackageMetadata_ab_post_timestamp) { "\n"); TestCheckPackageMetadata(metadata, OtaType::AB, true); } - -TEST(InstallTest, SetupPackageMount_package_path) { - load_volume_table(); - bool install_with_fuse; - - // Setup should fail if the input path doesn't exist. - ASSERT_FALSE(SetupPackageMount("/does_not_exist", &install_with_fuse)); - - // Package should be installed with fuse if it's not in /cache. - TemporaryDir temp_dir; - TemporaryFile update_package(temp_dir.path); - ASSERT_TRUE(SetupPackageMount(update_package.path, &install_with_fuse)); - ASSERT_TRUE(install_with_fuse); - - // Setup should fail if the input path isn't canonicalized. - std::string uncanonical_package_path = android::base::Join( - std::vector{ - temp_dir.path, - "..", - android::base::Basename(temp_dir.path), - android::base::Basename(update_package.path), - }, - '/'); - - ASSERT_EQ(0, access(uncanonical_package_path.c_str(), R_OK)); - ASSERT_FALSE(SetupPackageMount(uncanonical_package_path, &install_with_fuse)); -} -- cgit v1.2.3