diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2021-02-01 11:42:43 +0100 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2021-04-07 13:34:14 +0200 |
commit | 93ec399b2850d879057d3de27f9a36ca268d3430 (patch) | |
tree | bb623fcebbae924507fa0e3ae7bf06f6123b2115 /.gitlab-ci/lava.yml.jinja2 | |
parent | 8926c4a313e409a6098846de605f99436c0f0255 (diff) |
ci: Use a single template for LAVA jobs
It's a pain to keep both templates in sync and there aren't really that
many differences.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9950>
Diffstat (limited to '.gitlab-ci/lava.yml.jinja2')
-rw-r--r-- | .gitlab-ci/lava.yml.jinja2 | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/.gitlab-ci/lava.yml.jinja2 b/.gitlab-ci/lava.yml.jinja2 new file mode 100644 index 00000000000..b0c81cd7d89 --- /dev/null +++ b/.gitlab-ci/lava.yml.jinja2 @@ -0,0 +1,122 @@ +job_name: mesa-{{ test_suite }}-{{ deqp_version }}-{{ gpu_version }} {{ pipeline_info }} +device_type: {{ device_type }} +context: + extra_nfsroot_args: " init=/init rootwait" +timeouts: + job: + minutes: 40 + action: + minutes: 10 + actions: + power-off: + seconds: 30 +priority: 75 +visibility: + group: + - "Collabora+fdo" +{% if tags %} +{% set lavatags = tags.split(',') %} +tags: +{% for tag in lavatags %} + - {{ tag }} +{% endfor %} +{% endif %} +actions: +- deploy: + timeout: + minutes: 10 + to: tftp + kernel: + url: {{ base_artifacts_url }}/{{ kernel_image_name }} +{% if kernel_image_type %} + {{ kernel_image_type }} +{% endif %} + nfsrootfs: + url: {{ base_artifacts_url }}/lava-rootfs.tgz + compression: gz +{% if dtb %} + dtb: + url: {{ base_artifacts_url }}/{{ dtb }}.dtb +{% endif %} + os: oe +- boot: + timeout: + minutes: 5 + method: {{ boot_method }} +{% if boot_method == "fastboot" %} +{# + For fastboot, LAVA doesn't know how to unpack the rootfs/apply overlay/repack, + so we transfer the overlay over the network after boot. +#} + transfer_overlay: + download_command: wget -S --progress=dot:giga + unpack_command: tar -C / -xzf +{% else %} + commands: nfs +{% endif %} + prompts: + - 'lava-shell:' +- test: + timeout: + minutes: 60 + definitions: + - repository: + metadata: + format: Lava-Test Test Definition 1.0 + name: mesa + description: "Mesa test plan" + os: + - oe + scope: + - functional + run: + steps: + - mount -t proc none /proc + - mount -t sysfs none /sys + - mount -t devtmpfs none /dev || echo possibly already mounted + - mkdir -p /dev/pts + - mount -t devpts devpts /dev/pts + - echo "nameserver 8.8.8.8" > /etc/resolv.conf + - for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done + + - modprobe amdgpu || true + + - DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true` + - echo performance > $DEVFREQ_GOVERNOR || true + + - GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1` + - echo -1 > $GPU_AUTOSUSPEND || true + +{% if env_vars %} + - export {{ env_vars }} +{% endif %} + + # runner script assumes some stuff is in pwd + - cd / + + - wget -S --progress=dot:giga -O- {{ mesa_url }} | tar -xz + + - export DEQP_NO_SAVE_RESULTS=1 + - export GPU_VERSION={{ gpu_version }} + - export DEQP_VER={{ deqp_version }} + + - export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))") + - export PIGLIT_REPLAY_EXTRA_ARGS="--keep-image" + - export PIGLIT_REPLAY_REFERENCE_IMAGES_BASE_URL="/mesa-tracie-results/${CI_PROJECT_PATH}" + - export PIGLIT_REPLAY_ARTIFACTS_BASE_URL="/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/${CI_JOB_ID}" + - export PIGLIT_REPLAY_DESCRIPTION_FILE="/install/traces-${DRIVER_NAME}.yml" + - export PIGLIT_REPLAY_DEVICE_NAME=gl-{{ gpu_version }} + - export PIGLIT_RESULTS={{ gpu_version }}-${PIGLIT_PROFILES} + + - export LIBGL_DRIVERS_PATH=`pwd`/install/lib/dri + + - "if sh $LAVA_TEST_SCRIPT; then + echo 'mesa: pass'; + else + echo 'mesa: fail'; + fi" + parse: + pattern: '(?P<test_case_id>\S*):\s+(?P<result>(pass|fail))' + from: inline + name: mesa + path: inline/mesa.yaml |