Linaro Blog

Local LAVA testing of Android ICS

The Linaro Android team automatically test daily platform builds on our LAVA server[1], but what's less well known is that we can also run Android tests locally using lava-android-test[2]. I tried this out in order to debug a new benchmark I wanted to add, and it turns out that creating a mini version of validation.linaro.org is remarkably easy. It's as simple as getting a board powered up and available to adb, installing the tool and then running three commands to install, run and parse the results of your test case.

LAVA on a laptop

LAVA on a laptop

Get lava-android-test
There are two options here, Ubuntu users can use the validation team’s ppa[3]:
sudo apt-get install lava-android-test.
Hackers can install from source into a python virtualenv:
sudo apt-get install python-virtualenv
virtualenv lava-android-test-env
. lava-android-test-env/bin/activate
bzr branch lp:lava-android-test
cd lava-android-test
python setup.py install
deactivate

List available tests
lava-android-test list-tests

Install the test you want to run
lava-android-test install toolchain-benchmark -o <options> -s <adb device id>

Run the test
lava-android-test run toolchain-benchmark
This will output the test results file name.

Parse the results
lava-android-test parse <test results file name>

[1] Linaro Validation Server http://validation.linaro.org
[2] Lava Android Test Runner https://launchpad.net/lava-android-test
[3] Lava team PPA https://launchpad.net/~linaro-validation/+archive/ppa

Related posts:

About Frans Gifford

Frans studied electronics and software engineering at Oxford, Swansea and Nantes. He worked on Microsoft solutions for public bodies in Paris and Ottawa before moving back to the UK where he worked on everything from the application layer right through the middleware to the kernel on J2ME, Linux, Symbian and most recently, Android. He has been involved in various Free Software projects since 2001 and a fellow of the FSFE since 2008, he is excited to be back to the community on a full-time basis.
This entry was posted in Android, LAVA and tagged , , . Bookmark the permalink.

2 Responses to Local LAVA testing of Android ICS

  1. Zygmunt Krynicki says:

    You should _never_ run sudo python setup.py install, that’s bound to break your system and make your hair gray.

    $ sudo apt-get install python-virtualenv
    $ virtualenv some-stuff
    $ . some-stuff/bin/activate
    (some-stuff)$ bzr branch lp:lava-android-test
    (some-stuff)$ cd lava-android-test
    (some-stuff)$ python setup.py install
    (some-stuff)$ lava-android-test –help
    (some-stuff)$ deactivate
    $

    No root, no crap installed globally, no chance to break your system

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>