commit | 570af9dca36477f73ede025f76784e28da2cc720 | [log] [tgz] |
---|---|---|
author | Tao Bao <tbao@google.com> | Mon Jan 09 10:29:59 2017 -0800 |
committer | Tao Bao <tbao@google.com> | Mon Jan 09 10:35:42 2017 -0800 |
tree | 4ad9c42cd6a4a6c67d453e0edd93ad4a39b79bac | |
parent | 095675a3eb81fc32b73085a2e0dc0d963ce71a9e [diff] |
recovery: Fix the argument parsing. Commit f0ed159f488c57c4ede0503443eb62fadfe0a831 unintentionally changed the behavior when parsing the arguments from BCB and command file. It should only parse the command file for arguments if BCB doesn't supply any. As a result, it shows the following from the log: I:Got 2 arguments from boot message I:Got 3 arguments from /cache/recovery/command Test: Set arguments in BCB and command file both. It should only use the arguments from BCB. Change-Id: Idf371137aa9177f1b2dfdfecf0c9f46959d2ee76
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
recovery-refresh
and recovery-persist
executables exist only on systems without /cache partition. And we need to follow special steps to run tests for them.
Execute the test on an A/B device first. The test should fail but it will log some contents to pmsg.
Reboot the device immediately and run the test again. The test should save the contents of pmsg buffer into /data/misc/recovery/inject.txt. Test will pass if this file has expected contents.