blob: 3ed5dd80aef62601801c1db2401cac054125eef2 [file] [log] [blame]
{#
# LAVA template definition to run a TradeFed-based test suite on multiple DUTs.
#
# Template parameters:
# - build: The software build, e.g. "18.09.1-gms-26bdb2b5".
# - suite: The TradeFed test suite, e.g. "CTS".
# - version: The TradeFed test suite version, e.g. "7.1_r20".
# - archive: The URI to the TradeFed suite archive.
# - job
# - commands: The TradeFed test suite command to execute.
# - retry_commands: The TradeFed test suite command to execute on retry.
# - timeout: The job timeout in hours.
# - name_extra (optionnal): An extra string appended to the job name.
# Defaults to the empty string.
# - priority (optionnal): The job priority. Defaults to medium.
# - shards_param (optionnal): The sharding parameter to pass to the
# multinode command. Defaults to the empty string.
# - tags (optionnal): The list of tags required for the devices. Defaults
# to no tags.
# - master (optionnal)
# - tags (optionnal): The list of tags required for the master device,
# takes precedence over the job.tags list. Defaults to no tags.
# - worker (optionnal)
# - amount (optional): The amount of workers (on top of the master device)
# to run the job on. Defaults to 0.
# - tags (optionnal): The list of tags required for the worker devices,
# takes precedence over the job.tags list. Defaults to no tags.
#}
job_name: fairphone2-{{ build }}-{{ suite }}-{{ version }}{{ job.name_extra|default('') }}
timeouts:
job:
hours: {{ job.timeout + 2 }}
priority: {{ job.priority|default('medium') }}
visibility: public
reboot_to_fastboot: false
protocols:
lava-lxc:
master:
name: lxc-fairphone2-xts-master
template: debian
distribution: debian
release: stretch
worker:
name: lxc-fairphone2-xts-worker
template: debian
distribution: debian
release: stretch
lava-multinode:
roles:
master:
count: 1
device_type: fairphone2
timeout:
minutes: 30
tags:
{% if job.master and job.master.tags %}
{% for tag in job.master.tags %}
- {{ tag }}
{% endfor %}
{% elif job.tags %}
{% for tag in job.tags %}
- {{ tag }}
{% endfor %}
{% endif %}
worker:
expect_role: master
host_role: master
count: {% if job.worker and job.worker.amount %}{{ job.worker.amount }}
{% else %}0
{% endif %}
device_type: fairphone2
timeout:
minutes: 30
tags:
{% if job.worker and job.worker.tags %}
{% for tag in job.worker.tags %}
- {{ tag }}
{% endfor %}
{% elif job.tags %}
{% for tag in job.tags %}
- {{ tag }}
{% endfor %}
{% endif %}
actions:
{% include "partials/multinode-all-setup.yaml" %}
{% include "partials/multinode-all-flash-device-and-boot.yaml" %}
{% include "partials/multinode-worker-share-device.yaml" %}
{% include "partials/multinode-master-connect-to-devices.yaml" %}
- test:
namespace: tlxc
role:
- master
timeout:
hours: {{ job.timeout }}
definitions:
- repository: ssh://lava-dispatcher@review.fairphone.software/Infra/lava/qa/test-definitions
from: git
path: automated/android/multinode/tradefed/tradefed-multinode.yaml
branch: staging/fp
params:
TEST_PARAMS: "{{ job.command }}"
TEST_RETRY_PARAMS: "{{ job.retry_command }}"
{% if job.shards_param %}
TEST_PARAM_SHARDS_COUNT: "{{ job.shards_param }}"
{% endif %}
TEST_PATH: "android-{{ suite|lower }}"
TEST_URL: "{{ archive }}"
STATE_CHECK_FREQUENCY_SECS: "300"
MAX_NUM_RUNS: "25"
RUNS_IF_UNCHANGED: "5"
FAILURES_PRINTED: "50"
URL: "https://artifactorial.fairphone.software/artifacts/lava-{{ suite|lower }}/"
TOKEN: "a51c254d28d4532569739368a5176400"
USERDATA_IMAGE_FILE: "{{ userdata_image_file }}"
name: {{ suite|lower }}
{% include "partials/multinode-master-release-devices.yaml" %}