From d5a14c6a492d8609b2ce9c621fa9fe489fc45cdc Mon Sep 17 00:00:00 2001 From: Jed Estep Date: Fri, 5 Feb 2016 11:24:27 -0800 Subject: Change on-device directory for recovery test data Test data needs to go outside the gtest module. Change-Id: Ic444ca838cbafa651ec97ff8730129da84fafc09 --- tests/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 3f3c433eb..262fb8bfd 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -43,7 +43,7 @@ LOCAL_STATIC_LIBRARIES := \ libcutils \ libc -testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) +testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery testdata_files := $(call find-subdir-files, testdata/*) GEN := $(addprefix $(testdata_out_path)/, $(testdata_files)) -- cgit v1.2.3 From a4f701af93a5a739f34823cde0c493dfbc63537a Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 9 Mar 2016 14:58:16 -0800 Subject: recovery: use __android_log_pmsg_file_write for log files - Add call to __android_log_pmsg_file_write for recovery logging. - Add call to refresh pmsg if we reboot back into recovery and then allow overwrite of those logs. - Add a new one-time executable recovery-refresh that refreshes pmsg in post-fs phase of init. We rely on pmsg eventually scrolling off to age the content after recovery-persist has done its job. - Add a new one-time executable recovery-persist that transfers from pmsg to /data/misc/recovery/ directory if /cache is not mounted in post-fs-data phase of init. - Build and appropriately trigger the above two as required if BOARD_CACHEIMAGE_PARTITION_SIZE is undefined. - Add some simple unit tests NB: Test failure is expected on systems that do not deliver either the recovery-persist or recovery-refresh executables, e.g. systems with /cache. Tests also require a timely reboot sequence of test to truly verify, tests provide guidance on stderr to direct. Bug: 27176738 Change-Id: I17bb95980234984f6b2087fd5941b0a3126b706b --- tests/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 262fb8bfd..8f55fc0df 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -23,7 +23,9 @@ LOCAL_MODULE := recovery_unit_test LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_STATIC_LIBRARIES := libverifier LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp +LOCAL_SRC_FILES += unit/recovery_test.cpp LOCAL_C_INCLUDES := bootable/recovery +LOCAL_SHARED_LIBRARIES := liblog include $(BUILD_NATIVE_TEST) # Component tests -- cgit v1.2.3 From 452df6d99c81c4eeee3d2c7b2171901e8b7bc54a Mon Sep 17 00:00:00 2001 From: Mattias Nissler Date: Mon, 4 Apr 2016 16:17:01 +0200 Subject: Convert recovery to use BoringSSL instead of mincrypt. This changes the verification code in bootable/recovery to use BoringSSL instead of mincrypt. Change-Id: I37b37d84b22e81c32ac180cd1240c02150ddf3a7 --- tests/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 8f55fc0df..7b004b2a0 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -39,7 +39,8 @@ LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_STATIC_LIBRARIES := \ libbase \ libverifier \ - libmincrypt \ + libcrypto_utils_static \ + libcrypto_static \ libminui \ libminzip \ libcutils \ -- cgit v1.2.3 From ab2fb94bf48483d761ba3aa85e0acf851895566f Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 15 Jun 2016 21:15:43 -0700 Subject: tests: Remove obsolete MTD support. Track the change in commit 63a319201fc0f5c34c1c62b446527e06f57f8d40 and fix builds. Bug: http://b/29250988 Change-Id: Iad5be953e102020931649629afc980d585ed2931 --- tests/Android.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 4509c420f..279a6cb49 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -46,7 +46,6 @@ LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_STATIC_LIBRARIES := \ libapplypatch \ libotafault \ - libmtdutils \ libbase \ libverifier \ libcrypto_utils_static \ -- cgit v1.2.3 From 073164f24b212685c181c8620f0397d13e9d79c0 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Fri, 5 Aug 2016 15:59:05 -0700 Subject: Fix references to libcrypto_utils_static. Bug: http://b/30708454 Change-Id: I7a5048beff1d8b783a9683dcb4a79606a77f20ee --- tests/Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 7b004b2a0..a683395fc 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -39,8 +39,8 @@ LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_STATIC_LIBRARIES := \ libbase \ libverifier \ - libcrypto_utils_static \ - libcrypto_static \ + libcrypto_utils \ + libcrypto \ libminui \ libminzip \ libcutils \ -- cgit v1.2.3 From 7b0ad9c638176dc364dabb65b363536055a0ea9c Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Fri, 5 Aug 2016 18:00:04 -0700 Subject: Switch recovery to libbase logging Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35 Merged-In: Icd999c3cc832f0639f204b5c36cea8afe303ad35 --- tests/Android.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 971e5d0f0..633b3c451 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -46,7 +46,6 @@ LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_STATIC_LIBRARIES := \ libapplypatch \ libotafault \ - libbase \ libverifier \ libcrypto_utils \ libcrypto \ @@ -55,7 +54,9 @@ LOCAL_STATIC_LIBRARIES := \ libcutils \ libbz \ libz \ - libc + libc \ + libbase \ + liblog testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery testdata_files := $(call find-subdir-files, testdata/*) -- cgit v1.2.3 From 7aa88748f6ec4e53333d1a15747bc44826ccc410 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Wed, 28 Sep 2016 11:42:17 -0700 Subject: Turn on -Werror for recovery Also remove the 0xff comparison when validating the bootloader message fields. As the fields won't be erased to 0xff after we remove the MTD support. Bug: 28202046 Test: The recovery folder compiles for aosp_x86-eng Change-Id: Ibb30ea1b2b28676fb08c7e92a1e5f7b6ef3247ab --- tests/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 633b3c451..0754c7acf 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -19,6 +19,7 @@ LOCAL_PATH := $(call my-dir) # Unit tests include $(CLEAR_VARS) LOCAL_CLANG := true +LOCAL_CFLAGS := -Werror LOCAL_MODULE := recovery_unit_test LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_STATIC_LIBRARIES := \ @@ -35,7 +36,7 @@ include $(BUILD_NATIVE_TEST) # Component tests include $(CLEAR_VARS) LOCAL_CLANG := true -LOCAL_CFLAGS += -Wno-unused-parameter +LOCAL_CFLAGS += -Wno-unused-parameter -Werror LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := recovery_component_test LOCAL_C_INCLUDES := bootable/recovery -- cgit v1.2.3 From d770d2e7afd8a909156447c2b79d8739228279d7 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 3 Oct 2016 15:26:06 -0700 Subject: edify: Move the testcases to gtest. Now they live in tests/component/edify_test.cpp. Also rename edify/main.cpp to edify/edify_parser.cpp. It becomes a host-side debugging tool that validates the input edify script. However, it supports edify builtin functions only and doesn't recognize the ones defined via updater. Test: recovery_component_test passes on device. Change-Id: Ib94a787bf15098a9cc078d256b6a6dc96ff12b2e --- tests/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 0754c7acf..19cb80940 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -41,11 +41,13 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := recovery_component_test LOCAL_C_INCLUDES := bootable/recovery LOCAL_SRC_FILES := \ + component/edify_test.cpp \ component/verifier_test.cpp \ component/applypatch_test.cpp LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_STATIC_LIBRARIES := \ libapplypatch \ + libedify \ libotafault \ libverifier \ libcrypto_utils \ -- cgit v1.2.3 From 0c7839ac14a00f32d740c23ddf6df65f2757ece5 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 10 Oct 2016 15:48:37 -0700 Subject: Refactor libupdater into a seperate module. So that we can write native tests for updater functions. This CL adds a testcase for getprop() function. Test: mmma bootable/recovery; Run recovery_component_test on device. Change-Id: Iff4c1ff63c5c71aded2f9686fed6b71cc298c228 --- tests/Android.mk | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 19cb80940..ef822d1d1 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -41,25 +41,41 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := recovery_component_test LOCAL_C_INCLUDES := bootable/recovery LOCAL_SRC_FILES := \ + component/applypatch_test.cpp \ component/edify_test.cpp \ - component/verifier_test.cpp \ - component/applypatch_test.cpp + component/updater_test.cpp \ + component/verifier_test.cpp LOCAL_FORCE_STATIC_EXECUTABLE := true + +tune2fs_static_libraries := \ + libext2_com_err \ + libext2_blkid \ + libext2_quota \ + libext2_uuid_static \ + libext2_e2p \ + libext2fs + LOCAL_STATIC_LIBRARIES := \ libapplypatch \ libedify \ libotafault \ + libupdater \ libverifier \ - libcrypto_utils \ - libcrypto \ libminui \ libminzip \ + libmounts \ + liblog \ + libselinux \ + libext4_utils_static \ + libsparse_static \ + libcrypto_utils \ + libcrypto \ libcutils \ libbz \ libz \ - libc \ libbase \ - liblog + libtune2fs \ + $(tune2fs_static_libraries) testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery testdata_files := $(call find-subdir-files, testdata/*) -- cgit v1.2.3 From 8cf5c8f60f51049278b08ae4cbc31df397b651fd Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Thu, 8 Sep 2016 20:10:11 -0700 Subject: Replace minzip with libziparchive Clean up the duplicated codes that handle the zip files in bootable/recovery; and rename the library of the remaining utility functions to libotautil. Test: Update package installed successfully on angler. Bug: 19472796 Change-Id: Iea8962fcf3004473cb0322b6bb3a9ea3ca7f679e --- tests/Android.mk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index ef822d1d1..abe6b6d68 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -24,11 +24,18 @@ LOCAL_MODULE := recovery_unit_test LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_STATIC_LIBRARIES := \ libverifier \ - libminui + libminui \ + libotautil \ + libziparchive \ + libutils \ + libz \ + libselinux \ + libbase LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp LOCAL_SRC_FILES += unit/recovery_test.cpp LOCAL_SRC_FILES += unit/locale_test.cpp +LOCAL_SRC_FILES += unit/zip_test.cpp LOCAL_C_INCLUDES := bootable/recovery LOCAL_SHARED_LIBRARIES := liblog include $(BUILD_NATIVE_TEST) @@ -62,7 +69,7 @@ LOCAL_STATIC_LIBRARIES := \ libupdater \ libverifier \ libminui \ - libminzip \ + libotautil \ libmounts \ liblog \ libselinux \ -- cgit v1.2.3 From f1338fbf4104f000e41b4f84f705db72096da324 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 25 Oct 2016 15:05:40 -0700 Subject: tests: Generate testdata for 2nd arch. We currently only copy the testdata to $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery, which fails the tests generated for 2nd arch (TARGET_2ND_ARCH). For example, on angler /data/nativetest/recovery_component_test/recovery_component_test fails due to missing testdata. Bug: 32123241 Test: Both of /data/nativetest/recovery... and /data/nativetest64/recovery... work on angler. Change-Id: Ib76264b4408d01c08b2619c8ac84b2476ea5a8bc --- tests/Android.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index abe6b6d68..3d05386b0 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -84,13 +84,24 @@ LOCAL_STATIC_LIBRARIES := \ libtune2fs \ $(tune2fs_static_libraries) -testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery testdata_files := $(call find-subdir-files, testdata/*) +testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery GEN := $(addprefix $(testdata_out_path)/, $(testdata_files)) $(GEN): PRIVATE_PATH := $(LOCAL_PATH) $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ $(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/% $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) + +ifdef TARGET_2ND_ARCH +testdata_out_path_2nd_arch := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/recovery +GEN_2ND_ARCH := $(addprefix $(testdata_out_path_2nd_arch)/, $(testdata_files)) +$(GEN_2ND_ARCH): PRIVATE_PATH := $(LOCAL_PATH) +$(GEN_2ND_ARCH): PRIVATE_CUSTOM_TOOL = cp $< $@ +$(GEN_2ND_ARCH): $(testdata_out_path_2nd_arch)/% : $(LOCAL_PATH)/% + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN_2ND_ARCH) +endif # TARGET_2ND_ARCH + include $(BUILD_NATIVE_TEST) -- cgit v1.2.3 From 36c35119526023c9e28ec22915b26b1bf7da6bc3 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 25 Oct 2016 14:17:26 -0700 Subject: applypatch: Add testcases for applypatch executable. Refactor applypatch/main.cpp into libapplypatch_modes so that we can add testcases. Some changes to applypatch/main.cpp: - Replace char** argv with const char**; - Use android::base::Split() to split ":"; - Use android::base::ParseUInt(). Bug: 32383590 Test: Unit tests pass, install-recovery.sh works. Change-Id: I44e7bfa5ab717d439ea1d0ee9ddb7b2c40bb95a4 --- tests/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 3d05386b0..461d6ef76 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -43,7 +43,7 @@ include $(BUILD_NATIVE_TEST) # Component tests include $(CLEAR_VARS) LOCAL_CLANG := true -LOCAL_CFLAGS += -Wno-unused-parameter -Werror +LOCAL_CFLAGS := -Werror LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := recovery_component_test LOCAL_C_INCLUDES := bootable/recovery @@ -63,6 +63,7 @@ tune2fs_static_libraries := \ libext2fs LOCAL_STATIC_LIBRARIES := \ + libapplypatch_modes \ libapplypatch \ libedify \ libotafault \ -- cgit v1.2.3 From 4102b281324eca22cd4ef0922a79949ec6cf846e Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 2 Nov 2016 16:17:17 -0700 Subject: tests: Set up testdata path for continuous native tests. continuous_native_tests expects the testdata under DATA/ in continuous_native_tests.zip. This CL packs a copy of the testdata into continuous_native_tests.zip as DATA/nativetest/recovery/testdata (via LOCAL_PICKUP_FILES). This CL also removes the extra copy for nativetest64. Testdata will always stay at /data/nativetest/recovery/testdata, even for 64-bit version. Otherwise we will unnecessarily get four copies (two for data/ and another two for DATA/). Bug: 32123241 Test: mmma bootable/recovery && adb sync data. On bullhead, /data/nativetest/recovery_component_test/recovery_component_test works; /data/nativetest64/recovery_component_test/recovery_component_test works. Test: m continuous_native_test; DATA/nativetest/recovery/testdata exists. Change-Id: Ifefa0309de7af23c77654e8e450848ca2da218c2 --- tests/Android.mk | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 461d6ef76..8f19992b6 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -87,7 +87,8 @@ LOCAL_STATIC_LIBRARIES := \ testdata_files := $(call find-subdir-files, testdata/*) -testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery +# The testdata files that will go to $OUT/data/nativetest/recovery. +testdata_out_path := $(TARGET_OUT_DATA)/nativetest/recovery GEN := $(addprefix $(testdata_out_path)/, $(testdata_files)) $(GEN): PRIVATE_PATH := $(LOCAL_PATH) $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ @@ -95,14 +96,16 @@ $(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/% $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) -ifdef TARGET_2ND_ARCH -testdata_out_path_2nd_arch := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/recovery -GEN_2ND_ARCH := $(addprefix $(testdata_out_path_2nd_arch)/, $(testdata_files)) -$(GEN_2ND_ARCH): PRIVATE_PATH := $(LOCAL_PATH) -$(GEN_2ND_ARCH): PRIVATE_CUSTOM_TOOL = cp $< $@ -$(GEN_2ND_ARCH): $(testdata_out_path_2nd_arch)/% : $(LOCAL_PATH)/% +# A copy of the testdata to be packed into continuous_native_tests.zip. +testdata_continuous_zip_prefix := \ + $(call intermediates-dir-for,PACKAGING,recovery_component_test)/DATA +testdata_continuous_zip_path := $(testdata_continuous_zip_prefix)/nativetest/recovery +GEN := $(addprefix $(testdata_continuous_zip_path)/, $(testdata_files)) +$(GEN): PRIVATE_PATH := $(LOCAL_PATH) +$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ +$(GEN): $(testdata_continuous_zip_path)/% : $(LOCAL_PATH)/% $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN_2ND_ARCH) -endif # TARGET_2ND_ARCH +LOCAL_GENERATED_SOURCES += $(GEN) +LOCAL_PICKUP_FILES := $(testdata_continuous_zip_prefix) include $(BUILD_NATIVE_TEST) -- cgit v1.2.3 From c3292f3fcbb3cd608cc19b7459751fa5bb64ab84 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 4 Nov 2016 10:52:13 -0700 Subject: otautil: Clean up SysUtil.cpp. Add unit testcases for sysMapFile(). Test: recovery_unit_test passes. Test: Build and use the new recovery image to sideload a package. Test: Build and use the new recovery image to install an update. Change-Id: I77d8f1ea151ab513865d992c256ba93a1fcb51a4 --- tests/Android.mk | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 8f19992b6..86591f71d 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -18,7 +18,6 @@ LOCAL_PATH := $(call my-dir) # Unit tests include $(CLEAR_VARS) -LOCAL_CLANG := true LOCAL_CFLAGS := -Werror LOCAL_MODULE := recovery_unit_test LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk @@ -32,17 +31,19 @@ LOCAL_STATIC_LIBRARIES := \ libselinux \ libbase -LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp -LOCAL_SRC_FILES += unit/recovery_test.cpp -LOCAL_SRC_FILES += unit/locale_test.cpp -LOCAL_SRC_FILES += unit/zip_test.cpp +LOCAL_SRC_FILES := \ + unit/asn1_decoder_test.cpp \ + unit/locale_test.cpp \ + unit/recovery_test.cpp \ + unit/sysutil_test.cpp \ + unit/zip_test.cpp + LOCAL_C_INCLUDES := bootable/recovery LOCAL_SHARED_LIBRARIES := liblog include $(BUILD_NATIVE_TEST) # Component tests include $(CLEAR_VARS) -LOCAL_CLANG := true LOCAL_CFLAGS := -Werror LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := recovery_component_test -- cgit v1.2.3 From 5d8b53b248ac56cb8280d2d2d653f12c43a26abd Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Mon, 7 Nov 2016 14:45:59 -0800 Subject: Move recovery_test.cpp out of unit test Move recovery-refresh/persist tests out because these tests need special steps to run. Also switch the constants to std::string. Test: recovery_manual_test passed on an A/B device Change-Id: I60b3ec6f094044945c3aafc1fae540896a6ddea6 --- tests/Android.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 86591f71d..e87a22964 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -34,7 +34,6 @@ LOCAL_STATIC_LIBRARIES := \ LOCAL_SRC_FILES := \ unit/asn1_decoder_test.cpp \ unit/locale_test.cpp \ - unit/recovery_test.cpp \ unit/sysutil_test.cpp \ unit/zip_test.cpp @@ -42,6 +41,18 @@ LOCAL_C_INCLUDES := bootable/recovery LOCAL_SHARED_LIBRARIES := liblog include $(BUILD_NATIVE_TEST) +# Manual tests +include $(CLEAR_VARS) +LOCAL_CLANG := true +LOCAL_CFLAGS := -Werror +LOCAL_MODULE := recovery_manual_test +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_STATIC_LIBRARIES := libbase + +LOCAL_SRC_FILES := manual/recovery_test.cpp +LOCAL_SHARED_LIBRARIES := liblog +include $(BUILD_NATIVE_TEST) + # Component tests include $(CLEAR_VARS) LOCAL_CFLAGS := -Werror -- cgit v1.2.3 From ef0eb3b01b66fbbc97908667a3dd1e02d710cbb7 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 14 Nov 2016 21:29:52 -0800 Subject: updater: Fix the wrong return value for package_extract_file(). 'bool success = ExtractEntryToFile()' gives opposite result. Fix the issue and add testcases. Change the one-argument version of package_extract_file() to explicitly abort for non-existent zip entry. Note that this is NOT changing the behavior. Prior to this CL, it aborts from Evaluate() function, by giving a general cause code. Now it returns kPackageExtractFileFailure. BUg: 32903624 Test: recovery_component_test works. Change-Id: I7a273e9c0d9aaaf8c472b2c778f7b8d90362c24f --- tests/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index e87a22964..fdc947028 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -92,6 +92,8 @@ LOCAL_STATIC_LIBRARIES := \ libcrypto \ libcutils \ libbz \ + libziparchive \ + libutils \ libz \ libbase \ libtune2fs \ -- cgit v1.2.3 From bedf5fc11cea9cc6b92f37597fe8624d25b8d371 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 18 Nov 2016 12:01:26 -0800 Subject: updater: Refactor set_stage() and get_stage() functions. Add read_bootloader_message_from() and write_bootloader_message_to() to allow specifying the BCB device (/misc). Also add testcases for set_stage() and get_stage(). Test: recovery_component_test passes. Test: Build a recovery image and apply a two-step OTA package. Change-Id: If5ab06a1aaaea168d2a9e5dd63c07c0a3190e4ae --- tests/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index fdc947028..5f6a7ce0c 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -80,10 +80,12 @@ LOCAL_STATIC_LIBRARIES := \ libedify \ libotafault \ libupdater \ + libbootloader_message \ libverifier \ libminui \ libotautil \ libmounts \ + libfs_mgr \ liblog \ libselinux \ libext4_utils_static \ -- cgit v1.2.3 From 10334088017c9bfcf1b171567e7c4794876c33c9 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 12 Dec 2016 17:10:20 -0800 Subject: Add tests for setup-bcb and clear-bcb via uncrypt. Bug: http://b/33534933 Test: recovery_component_test passes (and fails on buggy build due to the CL in [1]). [1]: commit 7e31f421a514da09b90e46dbd642a5e9b16e0003 Change-Id: I120498048ec1db8f9fcbb3cf135c05d3a48cfcdf --- tests/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 5f6a7ce0c..1621f37bf 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -62,8 +62,10 @@ LOCAL_C_INCLUDES := bootable/recovery LOCAL_SRC_FILES := \ component/applypatch_test.cpp \ component/edify_test.cpp \ + component/uncrypt_test.cpp \ component/updater_test.cpp \ component/verifier_test.cpp + LOCAL_FORCE_STATIC_EXECUTABLE := true tune2fs_static_libraries := \ -- cgit v1.2.3 From 8b7301b7119e10f2f936c4c92f0a67a00cc2d203 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 14 Dec 2016 15:52:34 -0800 Subject: tests: Add tests for bootloader_message. Test: recovery_component_test passes. Change-Id: Ib9aa2ffd6b018546223c76b7424f4ba355f5b088 --- tests/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 1621f37bf..8ae52d799 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -61,6 +61,7 @@ LOCAL_MODULE := recovery_component_test LOCAL_C_INCLUDES := bootable/recovery LOCAL_SRC_FILES := \ component/applypatch_test.cpp \ + component/bootloader_message_test.cpp \ component/edify_test.cpp \ component/uncrypt_test.cpp \ component/updater_test.cpp \ -- cgit v1.2.3 From 97555da4a67d45ada0020c0ee58d1b280cb4b57d Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 15 Dec 2016 10:15:06 -0800 Subject: Add tests for imgdiff. Factor out libimgdiff static library for testing purpose. This CL adds the imgdiff tests on host and on target both (similar to libimgpatch). In practice, we only need imgdiff binary on host, and libimgpatch on target. But they should build and pass tests on both platforms. Test: recovery_host_test passes; recovery_component_test passes. Change-Id: I0eafb7faf727cdf70066310e845af6ee245d4f60 --- tests/Android.mk | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 8ae52d799..ec725d865 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -63,6 +63,7 @@ LOCAL_SRC_FILES := \ component/applypatch_test.cpp \ component/bootloader_message_test.cpp \ component/edify_test.cpp \ + component/imgdiff_test.cpp \ component/uncrypt_test.cpp \ component/updater_test.cpp \ component/verifier_test.cpp @@ -81,6 +82,9 @@ LOCAL_STATIC_LIBRARIES := \ libapplypatch_modes \ libapplypatch \ libedify \ + libimgdiff \ + libimgpatch \ + libbsdiff \ libotafault \ libupdater \ libbootloader_message \ @@ -88,6 +92,8 @@ LOCAL_STATIC_LIBRARIES := \ libminui \ libotautil \ libmounts \ + libdivsufsort \ + libdivsufsort64 \ libfs_mgr \ liblog \ libselinux \ @@ -128,3 +134,26 @@ LOCAL_GENERATED_SOURCES += $(GEN) LOCAL_PICKUP_FILES := $(testdata_continuous_zip_prefix) include $(BUILD_NATIVE_TEST) + +# Host tests +include $(CLEAR_VARS) +LOCAL_CFLAGS := -Werror +LOCAL_MODULE := recovery_host_test +LOCAL_MODULE_HOST_OS := linux +LOCAL_C_INCLUDES := bootable/recovery +LOCAL_SRC_FILES := \ + component/imgdiff_test.cpp +LOCAL_STATIC_LIBRARIES := \ + libimgdiff \ + libimgpatch \ + libbsdiff \ + libziparchive \ + libbase \ + libcrypto \ + libbz \ + libdivsufsort64 \ + libdivsufsort \ + libz +LOCAL_SHARED_LIBRARIES := \ + liblog +include $(BUILD_HOST_NATIVE_TEST) -- cgit v1.2.3 From e7e7b46666f27135783bcd45252655d9cf2edd33 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 21 Dec 2016 17:58:42 -0800 Subject: tests: Add testcase for ZipUtil. Test: recovery_unit_test passes. Change-Id: I8ad364e88aaee31579ed7206aad8e5620518d797 --- tests/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 8ae52d799..effed8313 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -35,7 +35,8 @@ LOCAL_SRC_FILES := \ unit/asn1_decoder_test.cpp \ unit/locale_test.cpp \ unit/sysutil_test.cpp \ - unit/zip_test.cpp + unit/zip_test.cpp \ + unit/ziputil_test.cpp LOCAL_C_INCLUDES := bootable/recovery LOCAL_SHARED_LIBRARIES := liblog -- cgit v1.2.3 From f19295c5dc7cefff2bb26b5bcbab5a76a16cffe3 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 22 Dec 2016 09:28:03 -0800 Subject: tests: Add test coverage for DirUtil. Test: recovery_unit_test passes. Change-Id: I764c56404c7ccdd57ae5486c946fbc9ac6ae7bc9 --- tests/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index effed8313..17e2b7f5b 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -33,6 +33,7 @@ LOCAL_STATIC_LIBRARIES := \ LOCAL_SRC_FILES := \ unit/asn1_decoder_test.cpp \ + unit/dirutil_test.cpp \ unit/locale_test.cpp \ unit/sysutil_test.cpp \ unit/zip_test.cpp \ -- cgit v1.2.3 From 31653660adad6aa220f1a975545042126ee83b84 Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Wed, 11 Jan 2017 14:02:13 -0800 Subject: Remove "_static" suffix from libext4_utils. Bug: 34220783 Change-Id: I34ccc3b11da0d1b48805967ad75b9ddade569930 --- tests/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 0aca8c6c7..09cedccb9 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -99,7 +99,7 @@ LOCAL_STATIC_LIBRARIES := \ libfs_mgr \ liblog \ libselinux \ - libext4_utils_static \ + libext4_utils \ libsparse_static \ libcrypto_utils \ libcrypto \ -- cgit v1.2.3 From 67f3aa880499c1143ed9aa1e5294a912a6962f28 Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Wed, 11 Jan 2017 14:38:20 -0800 Subject: Remove "_static" suffix from libsparse Bug: 34220783 Change-Id: I358f931f0b29f5bd526e1475180e477e2e90b936 --- tests/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 09cedccb9..1203817a2 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -100,7 +100,7 @@ LOCAL_STATIC_LIBRARIES := \ liblog \ libselinux \ libext4_utils \ - libsparse_static \ + libsparse \ libcrypto_utils \ libcrypto \ libcutils \ -- cgit v1.2.3 From d17a6885253da909e376ba5ca5084f5281f3557c Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Mon, 9 Jan 2017 11:18:29 -0800 Subject: Add checkers and tests for empty locale in PNG file match_locale() will return false for empty locale string in the PNG file. Also add a manual test to validate if a PNG file is qualified to use under recovery. Bug: 34054052 Test: recovery_manual_test catches invalid PNG files successfully & Locale_test passed Change-Id: Id7e2136e1d8abf20da15825aa7901effbced8b03 --- tests/Android.mk | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 1203817a2..1dbd2b614 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -49,10 +49,34 @@ LOCAL_CLANG := true LOCAL_CFLAGS := -Werror LOCAL_MODULE := recovery_manual_test LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk -LOCAL_STATIC_LIBRARIES := libbase +LOCAL_STATIC_LIBRARIES := \ + libminui \ + libbase LOCAL_SRC_FILES := manual/recovery_test.cpp -LOCAL_SHARED_LIBRARIES := liblog +LOCAL_SHARED_LIBRARIES := \ + liblog \ + libpng + +resource_files := $(call find-files-in-subdirs, bootable/recovery, \ + "*_text.png", \ + res-mdpi/images \ + res-hdpi/images \ + res-xhdpi/images \ + res-xxhdpi/images \ + res-xxxhdpi/images \ + ) + +# The resource image files that will go to $OUT/data/nativetest/recovery. +testimage_out_path := $(TARGET_OUT_DATA)/nativetest/recovery +GEN := $(addprefix $(testimage_out_path)/, $(resource_files)) + +$(GEN): PRIVATE_PATH := $(LOCAL_PATH) +$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ +$(GEN): $(testimage_out_path)/% : bootable/recovery/% + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + include $(BUILD_NATIVE_TEST) # Component tests -- cgit v1.2.3 From 7c5dbd67517b4c96455617ed59628e1de0b3fcbb Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Fri, 13 Jan 2017 17:32:20 -0800 Subject: Remove '_static' suffix from libext2* references. Bug: 34220783 Test: make checkbuild Change-Id: Iceea20e440a4bb6a3b254486a65a86401a2241ef --- tests/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 1dbd2b614..a7e7b3c35 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -100,7 +100,7 @@ tune2fs_static_libraries := \ libext2_com_err \ libext2_blkid \ libext2_quota \ - libext2_uuid_static \ + libext2_uuid \ libext2_e2p \ libext2fs -- cgit v1.2.3 From 25c56979dd85a33a6467949ab76f99a987a0a006 Mon Sep 17 00:00:00 2001 From: Sen Jiang Date: Tue, 10 May 2016 15:23:25 -0700 Subject: Use bspatch from external/bsdiff. Now ApplyBSDiffPatch() will stream the output to sink as we go instead of sinking everything at the end. Test: recovery_host_test Bug: 26982501 Change-Id: I05b6ed40d45e4b1b19ae72784cf705b731b976e3 --- tests/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index a7e7b3c35..3ab5ea6c2 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -111,6 +111,7 @@ LOCAL_STATIC_LIBRARIES := \ libimgdiff \ libimgpatch \ libbsdiff \ + libbspatch \ libotafault \ libupdater \ libbootloader_message \ @@ -173,6 +174,7 @@ LOCAL_STATIC_LIBRARIES := \ libimgdiff \ libimgpatch \ libbsdiff \ + libbspatch \ libziparchive \ libbase \ libcrypto \ -- cgit v1.2.3 From b72a15a2ab48c3944237a15f899faa237ee43974 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 2 Mar 2017 13:46:37 -0800 Subject: Recovery Test: add SideloadTest to test FUSE support on target FUSE FS is required in recovery sideload functionalites. This CL is to add a native test to flag when FUSE is not supported in the device kernel. Bug: 35768196 Test: mma, run recovery_component_test on marlin and pass all Change-Id: I43b6dbee658010df56ba4d4b0e91baa7fd1c4480 --- tests/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 3ab5ea6c2..c7d33256a 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -90,6 +90,7 @@ LOCAL_SRC_FILES := \ component/bootloader_message_test.cpp \ component/edify_test.cpp \ component/imgdiff_test.cpp \ + component/sideload_test.cpp \ component/uncrypt_test.cpp \ component/updater_test.cpp \ component/verifier_test.cpp -- cgit v1.2.3 From 1ea84d6da97f4c4269ac16c4d332bbff3466b1b8 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Wed, 22 Feb 2017 18:23:58 -0800 Subject: Refractor the code for imgdiff Put ImageChunk and some helper functions into a class. Also switch to using std::vector instead of malloc. Bug: 18606652 Test: imgdiff_test passed on host. Also generate a complete incremental OTA package. The file content is the same and time consumption is similar. Change-Id: Id603ada4e130ef521218400761a119001a86ca79 --- tests/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 3ab5ea6c2..9ee27a06a 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -176,6 +176,7 @@ LOCAL_STATIC_LIBRARIES := \ libbsdiff \ libbspatch \ libziparchive \ + libutils \ libbase \ libcrypto \ libbz \ -- cgit v1.2.3 From 56ebe620a241577ee2573649e57cc79c9931145b Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Thu, 16 Mar 2017 00:48:21 -0700 Subject: Add a test to perform block_image_update Add the following tests: stash src bspatch stashed_src tgt free stashed_src (expected a successful update) stash src free stashed_src fail_the_update (expected stashed_src freed) Bug: 36242722 Test: Test identified unfreed stashes correctly. Change-Id: I5a136e8dc31774367972fbfe8c63cbc1ddb3a113 --- tests/Android.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index ec971b38c..65f736d13 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -81,7 +81,10 @@ include $(BUILD_NATIVE_TEST) # Component tests include $(CLEAR_VARS) -LOCAL_CFLAGS := -Werror +LOCAL_CFLAGS := \ + -Werror \ + -D_FILE_OFFSET_BITS=64 + LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := recovery_component_test LOCAL_C_INCLUDES := bootable/recovery @@ -136,6 +139,10 @@ LOCAL_STATIC_LIBRARIES := \ libz \ libbase \ libtune2fs \ + libfec \ + libfec_rs \ + libsquashfs_utils \ + libcutils \ $(tune2fs_static_libraries) testdata_files := $(call find-subdir-files, testdata/*) -- cgit v1.2.3 From d7bf82eb5358df367daaac12562fe5aa4e87ba63 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 18 Mar 2017 09:24:11 -0700 Subject: Remove the dead #include's in verifier.cpp. A follow-up to commit 5e535014dd7961fbf812abeaa27f3339775031f1. Also clean up Android.mk, since libverifier no longer needs anything from libminui. Test: mmma bootable/recovery Test: recovery_component_test passes. Change-Id: I1c11e4bbeef67ca34a2054debf1f5b280d509217 --- tests/Android.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 65f736d13..ff6e14c9b 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -120,7 +120,6 @@ LOCAL_STATIC_LIBRARIES := \ libupdater \ libbootloader_message \ libverifier \ - libminui \ libotautil \ libmounts \ libdivsufsort \ -- cgit v1.2.3 From 62e0bc7586077b3bde82759fb34b51b982cea20f Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 10 Apr 2017 16:55:57 -0700 Subject: Verify the package compatibility with libvintf. verify_package_compatibility() is added to parse the compatibility entry (compatibility.zip) in a given OTA package. If entry is present, the information is sent to libvintf to check the compatibility. This CL doesn't actually call libvintf, since the API there is not available yet. Bug: 36597505 Test: Doesn't break the install with existing packages (i.e. w/o the compatibility entry). Test: recovery_component_test Change-Id: I3903ffa5f6ba33a5c0d761602ade6290c6752596 --- tests/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index ff6e14c9b..1e433a76e 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -93,6 +93,7 @@ LOCAL_SRC_FILES := \ component/bootloader_message_test.cpp \ component/edify_test.cpp \ component/imgdiff_test.cpp \ + component/install_test.cpp \ component/sideload_test.cpp \ component/uncrypt_test.cpp \ component/updater_test.cpp \ @@ -117,6 +118,7 @@ LOCAL_STATIC_LIBRARIES := \ libbsdiff \ libbspatch \ libotafault \ + librecovery \ libupdater \ libbootloader_message \ libverifier \ @@ -131,7 +133,6 @@ LOCAL_STATIC_LIBRARIES := \ libsparse \ libcrypto_utils \ libcrypto \ - libcutils \ libbz \ libziparchive \ libutils \ -- cgit v1.2.3 From a233a89d99b673eccaf072f9d0f452afa1c725c7 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 17 Apr 2017 16:46:05 -0700 Subject: Add tests for update_binary_command(). Expose update_binary_command() through private/install.h for testing purpose. Also make minor clean-ups to install.cpp: a) adding more verbose logging on ExtractToMemory failures; b) update_binary_command() taking std::string instead of const char*; c) moving a few macro and global constants into update_binary_command(). Bug: 37300957 Test: recovery_component_test on marlin Test: Build new recovery and adb sideload on angler and sailfish. Change-Id: Ib2d9068af3fee038f01c90940ccaeb0a7da374fc Merged-In: Ib2d9068af3fee038f01c90940ccaeb0a7da374fc (cherry picked from commit bc4b1fe4c4305ebf0fbfc891b9b508c14b5c8ef8) --- tests/Android.mk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 1e433a76e..22a8efcbb 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -86,6 +86,11 @@ LOCAL_CFLAGS := \ -D_FILE_OFFSET_BITS=64 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk + +ifeq ($(AB_OTA_UPDATER),true) +LOCAL_CFLAGS += -DAB_OTA_UPDATER=1 +endif + LOCAL_MODULE := recovery_component_test LOCAL_C_INCLUDES := bootable/recovery LOCAL_SRC_FILES := \ -- cgit v1.2.3 From da320ac6ab53395ddff3cc08b88a61f977ed939a Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 10 Apr 2017 16:55:57 -0700 Subject: Call libvintf to verify package compatibility. The libvintf API has landed. Hook up to do the actual verification. Bug: 36597505 Test: recovery_component_test Test: m recoveryimage; adb sideload on angler and sailfish, with packages that contain dummy compatibility entries. Test: m recoveryimage; adb sideload on angler and sailfish, with packages that don't contain any compatibility entries. Change-Id: Idbd6f5aaef605ca51b20e667505d686de5ac781f --- tests/Android.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 22a8efcbb..f59f486d7 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -133,6 +133,9 @@ LOCAL_STATIC_LIBRARIES := \ libdivsufsort64 \ libfs_mgr \ liblog \ + libvintf_recovery \ + libvintf \ + libtinyxml2 \ libselinux \ libext4_utils \ libsparse \ -- cgit v1.2.3