commit | 36c35119526023c9e28ec22915b26b1bf7da6bc3 | [log] [tgz] |
---|---|---|
author | Tao Bao <tbao@google.com> | Tue Oct 25 14:17:26 2016 -0700 |
committer | Tao Bao <tbao@google.com> | Tue Nov 01 14:40:14 2016 -0700 |
tree | 35f2c84f96be62b67b4b9d4cc9bb5f7afc82cf40 | |
parent | 3f4030e0ef53c9e308b70788dc53bf0c5cfcd06a [diff] |
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
mm -j && m ramdisk-nodeps && m recoveryimage-nodeps # To boot into the new recovery image # without flashing the recovery partition: adb reboot bootloader fastboot boot $ANDROID_PRODUCT_OUT/recovery.img
# After setting up environment and lunch. mmma -j bootable/recovery # Running the tests on device. adb root adb sync data # 32-bit device adb shell /data/nativetest/recovery_unit_test/recovery_unit_test adb shell /data/nativetest/recovery_component_test/recovery_component_test # Or 64-bit device adb shell /data/nativetest64/recovery_unit_test/recovery_unit_test adb shell /data/nativetest64/recovery_component_test/recovery_component_test