Job definition¶
The job definition is a yaml
file that you submit to the LAVA server.
This file is describing everything that LAVA needs to know to run your tests on
a DUT.
QEMU example¶
Let's look at this example:
device_type: qemu
job_name: simple qemu job
timeouts:
job:
minutes: 20
priority: medium
visibility: public
context:
arch: amd64
actions:
- deploy:
to: tmpfs
timeout:
minutes: 20
images:
rootfs:
url: http://images.validation.linaro.org/kvm/debian-sid-2014_08_21-amd64.qcow2.xz
image_arg: -drive format=qcow2,file={rootfs}
format: qcow2
compression: xz
os: debian
- boot:
method: qemu
media: tmpfs
timeout:
minutes: 5
prompts:
- 'root@debian:~#'
auto_login:
login_prompt: "login:"
username: root
- test:
timeout:
minutes: 5
definitions:
- repository: https://github.com/Linaro/test-definitions
from: git
path: automated/linux/smoke/smoke.yaml
name: smoke-tests
- repository: https://github.com/Linaro/test-definitions
from: git
path: automated/linux/meminfo/meminfo.yaml
name: meminfo
Structure¶
The job definition is made of:
device_type
: requested device-typejob_name
: name of the job, sometime calleddescription
timeouts
: timeout definitionpriority
: job priorityvisibility
: job visibilityactions
: list of actions to run
In this definition, we request to run a job called simple qemu tjob
on a qemu
DUT.
The job is visible to everyone (including anonymous users).
The job will not run for more than 10 minutes at medium
priority.
Actions¶
actions
is a list of actions that LAVA will have to execute for the given
job.
Currently, LAVA support four type of actions:
- command: run commands on the dispatcher
- deploy: deploy software on the DUT
- boot: boot the DUT
- test: run some tests
Deploy¶
The deploy action will deploy the software on the DUT, using the method
specified by the to
.
In this example, we are requesting to deploy to tmpfs
. The rootfs
will be
downloaded from the given url.
deployment methods
LAVA supports many deployment methods. However, only some methods are supported by each device-type.
Boot¶
The boot action will boot the DUT, using the method specified by the method
.
In this example, we are requesting to boot qemu
using the software from
tmpfs
.
boot methods
LAVA supports many boot methods. However, only some methods are supported by each device-type.
Test¶
The test action will run the given tests on the DUT.
In this example, LAVA will download the test definitions from two git repositories.
test methods
LAVA supports three test methods that do not depend on the device-type.