tree: 4e74b3e6ba4d54ce164453abff705632bb6aa81c [path history] [tgz]
  1. device_types/
  2. templates/
  3. generate-lava-jobs
  4. README.md
  5. requirements.txt
lava/README.md

Generate the LAVA job definitions to test a software build

Each Android software build must pass the following Android test suites:

These suites are automated testing harnesses to ensure compatibility and correct behaviour of Android software build. More information is available on the CTS page. GTS and STS are not publicly available.

This tool aims at generating ready-to-use LAVA job definitions to execute the test suites and obtain final results without operator intervention. LAVA (Linaro Automated Validation Architecture) is "an automated testing system [...] which delivers the device automation and result collection" that we use to validate software builds on many device configurations.

Since all the test suites mentioned above are based on the Trade Federation continuous test framework (TradeFed), they share a common template (templates/multinode-tradefed-xts.yaml) that is configured per test suite.

Requirements

  • Python 3

How to use

$ virtualenv -p python3 .venv
$ . ./.venv/bin/activate
$ pip install -r requirements.txt
$ ./generate-lava-jobs --output-directory 18.09.1-jobs 18.09.1-gms-26bdb2b5

Submitting jobs to LAVA

LAVA implements an XML-RPC API for controlling the LAVA scheduler, fetching results and more. lava-tool provides command line access to many of these API functions, including submitting jobs. It is available in the Ubuntu and Debian repositories. Don't use the pip version, it has not been maintained for some time. Version 0.24 or later should work fine.

$ apt install lava-tool

Set up lava-tool's access to the API:

  1. Assuming your LAVA host address is https://lavahost/ and your user name is lavauser.

  2. Create an API authentication token in LAVA on https://lavahost/api/tokens/.

  3. Add an authentication endpoint to lava-tool for your LAVA host. It will prompt you for the access token.

     $ lava-tool auth-add https://lavauser@lavahost/RPC2/
    

Finally use that endpoint to submit YAML job definitions:

$ lava-tool submit-job https://lavauser@lavahost/RPC2/ 18.09.1-jobs/multinode-tradefed-cts-appsecurityhost.yaml