summaryrefslogtreecommitdiffstats
path: root/tests/component
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-03-13 06:43:55 +0100
committerandroid-build-merger <android-build-merger@google.com>2019-03-13 06:43:55 +0100
commitaac4903a64d43f4bb540a24be95cffe07d46a9e2 (patch)
treebf40af1a74130b62db507c47f4af792de94bb380 /tests/component
parentMerge "minui: Managed FDs with smart pointers." am: fc7a0dc3a2 (diff)
parentMerge "Use the package class for wipe packages" (diff)
downloadandroid_bootable_recovery-aac4903a64d43f4bb540a24be95cffe07d46a9e2.tar
android_bootable_recovery-aac4903a64d43f4bb540a24be95cffe07d46a9e2.tar.gz
android_bootable_recovery-aac4903a64d43f4bb540a24be95cffe07d46a9e2.tar.bz2
android_bootable_recovery-aac4903a64d43f4bb540a24be95cffe07d46a9e2.tar.lz
android_bootable_recovery-aac4903a64d43f4bb540a24be95cffe07d46a9e2.tar.xz
android_bootable_recovery-aac4903a64d43f4bb540a24be95cffe07d46a9e2.tar.zst
android_bootable_recovery-aac4903a64d43f4bb540a24be95cffe07d46a9e2.zip
Diffstat (limited to 'tests/component')
-rw-r--r--tests/component/install_test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/component/install_test.cpp b/tests/component/install_test.cpp
index 117813694..969805b42 100644
--- a/tests/component/install_test.cpp
+++ b/tests/component/install_test.cpp
@@ -120,7 +120,10 @@ TEST(InstallTest, read_wipe_ab_partition_list) {
std::string wipe_package;
ASSERT_TRUE(android::base::ReadFileToString(temp_file.path, &wipe_package));
- std::vector<std::string> read_partition_list = GetWipePartitionList(wipe_package);
+ auto package = Package::CreateMemoryPackage(
+ std::vector<uint8_t>(wipe_package.begin(), wipe_package.end()), nullptr);
+
+ auto read_partition_list = GetWipePartitionList(package.get());
std::vector<std::string> expected = {
"/dev/block/bootdevice/by-name/system_a", "/dev/block/bootdevice/by-name/system_b",
"/dev/block/bootdevice/by-name/vendor_a", "/dev/block/bootdevice/by-name/vendor_b",