commit | 7d34fa17ab8602b591a0d91d2acb8f24707b336b | [log] [tgz] |
---|---|---|
author | Tao Bao <tbao@google.com> | Thu Dec 08 18:10:48 2016 -0800 |
committer | Tao Bao <tbao@google.com> | Thu Dec 08 18:15:29 2016 -0800 |
tree | 6927cb2a3f285e95704020273ab6e46431766f40 | |
parent | 3aadbbac39259e25d231d81687aabb2452893895 [diff] |
recovery: Fix the argument parsing from COMMAND_FILE. Commit f0ed159f488c57c4ede0503443eb62fadfe0a831 didn't ensure mounting COMMAND_FILE (i.e. /cache) prior to reading. Also the first argument in COMMAND_FILE should not be dropped (unlike the first "recovery" argument in BCB message). Bug: 33431888 Test: Push /cache/recovery/command and recovery imag parses the arguments successfully. Change-Id: Ica3157a0bb03a2355315123354617eaf3fff15a4
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.