aboutsummaryrefslogtreecommitdiff
Workload Automation v2 in LAVA (WAv2)
*************************************
This directory contains test definitnions and supporting files to run Workload Automation in LAVA.

Job Construction
================
Coordination of the workload automation *host* and the Versatile Express TC2 or juno *target* is done through a multi-node job definition (wav2multi.json).  The actions in the JSON file are assigned to specific roles (host & target). The roles are then invoked using lava ACTIONs and in these jobs, the roles execute respective lava-test-shell tests defined in YAML (wa2host.yaml) and wa2target.yaml). The two devices coordinate their execution using synchronization API functions within the lava-test-shell tests. In this test there are 3 api calls used.

* **lava-wait** (waits for data from **lava-send**)
* **lava-sync** (waits for all devices)

Parameter description for wa2host.yaml, wa2target.yaml and wa2host_postprocessing.yaml

* wa2host.yaml

  * **AGENDA** - name of the agenda file to run specific workload on TC2. Agenda files are stored in this repository in templates directory.

  * **JOB_NAME** - name that identifies job or set of jobs that aggregate results in a single database

  * **MODE** - mp (HMP mode booting to A7 cluster), iks (In Kernel Switcher), a7only (only A7 cluster online), a15only (only A15 cluster online)

  * **SIGNAL_PREFIX** - identifies the host-target pair of lava-test-shells

* wa2target.yaml

  * **SIGNAL_PREFIX** - identifies the host-target pair of lava-test-shells

* wa2host_postprocessing.yaml

  * **JOB_NAME** - name that identifies job or set of jobs that aggregate results in a single database. Postprocessing YAML uses this database

  * **DELETE_DB** - if set to true, database is deleted after postprocessing is done. Default: false

More information on multi-node can be found in the LAVA documentation:

* Documentation:  https://validation.linaro.org/static/docs/writing-multinode.html
* API: https://validation.linaro.org/static/docs/multinodeapi.html?highlight=multinode

Data postprocessing
===================
To simplify the post processing of data from multiple lava actions and possibly multiple lava test runs, the test uses an external sqlite database (hosted on the KVM) and the WAv2  options to store the results until they are ready to be processed (after the entire WAv2 run). Database schema and contents are created by WAv2. Database is located in /root/db_results/ directory. Database name is defined in wa2host.yaml as a parameter JOB_NAME. The parameter has to have the same value for all the jobs running on the same build in order to store the results in the same database.

Database data postprocessing is done using separate YAML definition - wa2host_postprocessing.yaml. It takes one parameter that defines the name of the database to use. The parameter name is the same as for testing jobs: JOB_NAME

Overview of LAVA Architecture
========================================
WAv2-in-LAVA uses multinode setup to run workload automation testing.
In multinode setup kvm device act as host and vexpress-tc2 or juno are target devices.

Results
----------------
The test jobs we execute in LAVA submit results into private bundle streams with access controls.

Block diagram
----------------------
::

    wa2multi.json
   +---------------------------------------------------------+
   |  wa2host.yaml                   wa2target.yaml          |
   | +-----------------------+      +----------------------+ |
   | |host: kvm              |      |target: vexpress-tc2  | |
   | |                       |      |target: juno          | |
   | |deploy: kvm image      |      |deploy: android       | |
   | |install:               |  IP  |                      | |
   | |   + WAv2 Repository   |<-----|                      | |
   | |   + WAv2 dependencies |      |                      | |
   | |   + SDK build tools   | adb  |                      | |
   | |run:                   |----->|                      | |
   | |   + WAv2 run tests    |      |                      | |
   | +-----------------------+      +----------------------+ |
   +---------------------------------------------------------+

KVM Configuration
========================
Please refer wa2host.yaml and install-wa2.sh for KVM configuration