Add Android Validation and Result Collection to LAVA

Registered by Jim Huang on 2011-03-07

Extend the validation infrastructure to support manually initiated Android validation and collect the results via the serial console.

In order to integrate Linaro validation framework and other automation mechanisms like CTS, we should provide the basic validation for Android system, otherwise we can not distinguish from the running state.

Expected verification items:
 * /init
 * Zygote
 * system_server

Required basic support additions to lava:
 * action: deploy android image
 * action: boot android image (with waiting for adb to come up through network)
 * action: basic validation like above (init, zygote, system_server)
 * action: basic validation results submission

 * kernel/boot fail will be covered by submitting the serial log (as always); adb timeout is indication that something failed early.
 * adb can access the device, IP can be resolved through DNS using the boardname+internal domain; boardname is available in the lava actions

Write a script to check the status:
 * check if adb can access the device, if not, return fail.
 * check if android status is boot completed.
 * if the status is not boot completed, check the status of the zygote, system_server, etc.
 * restart the zygote and get the logcat message.

Blueprint information

Alexander Sack
Jeremy Chang
Jeremy Chang
Series goal:
Accepted for 2011q2
Milestone target:
milestone icon 11.06
Started by
Jim Huang on 2011-03-07
Completed by
Zach Pfeffer on 2011-06-22


Headline: LAVA supports manual Android validation with 0xbench from 0xlab

[asac Mar 19, 2011]: this blueprint needs work items; it should cover adding general support for android to LAVA; that is: implement lava deploy_image, boot_android and submit result basics in lp:lava; basic validation should also be done as already outlined in whiteboard.
[asac Mar 19, 2011]: setting priority to essential (ASAP); setting milestone to next available - aka 11.04 (even though this should really happen asap)
[asac mar 19, 2011]: moving whiteboard content to summary (because only work items and comments should be her)
[asac, apr 6, 2011]: approved work items and blueprint
[jeremychang, apr 8, 2011] adb connection setup done. If basic validation check fail, including the adb connection check fail, the job should just exits/finished which means the afterward actions should not be executed.
[jeremychang, apr 8, 2011] There is a need to tell abrek what device to connect if intending abrek running on host side. This includes how we identify each device and how we designate the ip to each board. We can attach(register) a device from lava through the command "adb connect $dev_ip", though the one that maintains the android device registry is the "adb host server" rather than the abrek or lava. There could be many devices attached and maintained by the "adb host server".
 Another thing for running abrek on host side is the hw_context and sw_context information needs to be tweaked for Android system. Talk more about running abrek on host side and that will be another issue.
[jeremychang, apr 27,2011] benchmark integration will be target at another blueprint, linaro-android-benchmark-suite-integration-into-lava
[asac, apr 27,2011] test result format was agreed and example test files have been added for basic and monkey
[asac, apr 29,2011]: code didnt finish; problem with partition still there; moving to next milestone; lets knock this out soonish; please file a bug on the partition thing so we can track that.
[asac, may 27 2011]: spec implemented; next: LAVA integration will be tracked in separate spec.


Work Items

Work items:
replicate lava setup in engineer environment: DONE
send comments on how painful/nice it was to plars, asac and jamie: DONE
write a example test description that includes android image boot and setup adb connection: DONE
review, agree with asac on test format; update test file based on feedback : DONE
implement android image deploy for lava: DONE
request review and merge deploy code into lp:lava : DONE
implement android image boot for lava: DONE
request review and merge boot code into lp:lava : DONE
implement android test execution command for example to lava: DONE
request review and merge test execution command support code into lp:lava : DONE
update test so that it produces launch-control compatible json bundle: DONE
validate that full boot, testing, result submission works: DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.