2021-06-10 23:19:08 +01:00
|
|
|
job_name: "mesa: {{ pipeline_info }}"
|
2020-01-28 14:19:53 +00:00
|
|
|
device_type: {{ device_type }}
|
2020-07-28 10:42:42 +01:00
|
|
|
context:
|
|
|
|
extra_nfsroot_args: " init=/init rootwait"
|
2020-01-28 14:19:53 +00:00
|
|
|
timeouts:
|
|
|
|
job:
|
2021-03-31 14:00:35 +01:00
|
|
|
minutes: 30
|
2020-01-28 14:19:53 +00:00
|
|
|
priority: 75
|
2021-03-23 08:35:17 +00:00
|
|
|
visibility:
|
|
|
|
group:
|
|
|
|
- "Collabora+fdo"
|
2020-01-28 14:19:53 +00:00
|
|
|
{% if tags %}
|
|
|
|
{% set lavatags = tags.split(',') %}
|
|
|
|
tags:
|
|
|
|
{% for tag in lavatags %}
|
|
|
|
- {{ tag }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
actions:
|
|
|
|
- deploy:
|
|
|
|
timeout:
|
|
|
|
minutes: 10
|
|
|
|
to: tftp
|
|
|
|
kernel:
|
2021-06-10 14:53:57 +01:00
|
|
|
url: {{ base_system_url_prefix }}/{{ kernel_image_name }}
|
2020-01-28 14:19:53 +00:00
|
|
|
{% if kernel_image_type %}
|
|
|
|
{{ kernel_image_type }}
|
|
|
|
{% endif %}
|
2020-07-28 10:42:42 +01:00
|
|
|
nfsrootfs:
|
2021-06-10 14:53:57 +01:00
|
|
|
url: {{ base_system_url_prefix }}/lava-rootfs.tgz
|
2020-01-28 14:19:53 +00:00
|
|
|
compression: gz
|
2020-07-03 09:04:20 +01:00
|
|
|
{% if dtb %}
|
2020-01-28 14:19:53 +00:00
|
|
|
dtb:
|
2021-06-10 14:53:57 +01:00
|
|
|
url: {{ base_system_url_prefix }}/{{ dtb }}.dtb
|
2020-07-03 09:04:20 +01:00
|
|
|
{% endif %}
|
2020-01-28 14:19:53 +00:00
|
|
|
os: oe
|
|
|
|
- boot:
|
|
|
|
timeout:
|
2021-03-31 14:00:35 +01:00
|
|
|
minutes: 25
|
2020-01-28 14:19:53 +00:00
|
|
|
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 %}
|
2020-07-28 10:42:42 +01:00
|
|
|
commands: nfs
|
2020-01-28 14:19:53 +00:00
|
|
|
{% endif %}
|
|
|
|
prompts:
|
|
|
|
- 'lava-shell:'
|
|
|
|
- test:
|
|
|
|
timeout:
|
2021-03-31 14:00:35 +01:00
|
|
|
minutes: 30
|
2021-03-31 14:01:48 +01:00
|
|
|
failure_retry: 1
|
2020-01-28 14:19:53 +00:00
|
|
|
definitions:
|
|
|
|
- repository:
|
|
|
|
metadata:
|
|
|
|
format: Lava-Test Test Definition 1.0
|
2021-02-01 10:42:43 +00:00
|
|
|
name: mesa
|
|
|
|
description: "Mesa test plan"
|
2020-01-28 14:19:53 +00:00
|
|
|
os:
|
|
|
|
- oe
|
|
|
|
scope:
|
|
|
|
- functional
|
|
|
|
run:
|
|
|
|
steps:
|
2021-06-10 13:05:38 +01:00
|
|
|
# A bunch of setup we have to do before we can pull anything
|
|
|
|
- cd /
|
2020-01-28 14:19:53 +00:00
|
|
|
- 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
|
2021-03-19 11:52:35 +00:00
|
|
|
- mkdir -p /dev/shm
|
|
|
|
- mount -t tmpfs tmpfs /dev/shm
|
2021-04-16 22:47:14 +01:00
|
|
|
- mount -t tmpfs tmpfs /tmp
|
|
|
|
|
2020-01-28 14:19:53 +00:00
|
|
|
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
2021-04-16 14:55:55 +01:00
|
|
|
- echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts
|
2020-07-31 05:51:47 +01:00
|
|
|
- for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done
|
2020-01-28 14:19:53 +00:00
|
|
|
|
2021-06-10 14:53:57 +01:00
|
|
|
- wget -S --progress=dot:giga -O- {{ mesa_build_url }} | tar -xz
|
2021-06-11 15:43:17 +01:00
|
|
|
- wget -S --progress=dot:giga -O- {{ job_rootfs_overlay_url }} | tar -xz -C /
|
|
|
|
- . /set-job-env-vars.sh
|
2021-06-10 13:05:38 +01:00
|
|
|
- mkdir -p $CI_PROJECT_DIR
|
|
|
|
- ln -sf /install $CI_PROJECT_DIR/install
|
|
|
|
|
|
|
|
# Set up our devices
|
2021-06-11 15:41:50 +01:00
|
|
|
- '[ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe)'
|
2020-01-28 14:19:53 +00:00
|
|
|
|
2021-05-28 10:41:20 +01:00
|
|
|
# Disable GPU frequency scaling
|
2021-02-01 10:42:43 +00:00
|
|
|
- DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
|
|
|
|
- echo performance > $DEVFREQ_GOVERNOR || true
|
|
|
|
|
2021-05-28 10:41:20 +01:00
|
|
|
# Disable CPU frequency scaling
|
|
|
|
- echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
|
|
|
|
|
|
|
|
# Disable GPU runtime PM
|
2021-02-01 10:42:43 +00:00
|
|
|
- GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
|
|
|
|
- echo -1 > $GPU_AUTOSUSPEND || true
|
|
|
|
|
2021-06-10 13:05:38 +01:00
|
|
|
- export CI_JOB_JWT="{{ jwt }}"
|
2021-04-16 22:47:14 +01:00
|
|
|
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
|
|
|
- export XDG_CACHE_HOME=/tmp
|
|
|
|
|
2020-01-28 14:19:53 +00:00
|
|
|
- export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
|
2021-04-09 10:55:34 +01:00
|
|
|
- export LIBGL_DRIVERS_PATH=/install/lib/dri
|
|
|
|
|
|
|
|
# If we want Xorg to be running for the test, then we start it up before the
|
|
|
|
# LAVA_TEST_SCRIPT because we need to use xinit to start X (otherwise
|
|
|
|
# without using -displayfd you can race with Xorg's startup), but xinit will eat
|
|
|
|
# your client's return code
|
|
|
|
- "if [ -n $LAVA_START_XORG ]; then
|
|
|
|
echo 'touch /xorg-started; sleep 100000' > /xorg-script;
|
2021-06-12 01:07:31 +01:00
|
|
|
env LD_LIBRARY_PATH=/install/lib/ xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
2021-04-09 10:55:34 +01:00
|
|
|
for i in 1 2 3 4 5; do
|
|
|
|
if [ -e /xorg-started ]; then
|
|
|
|
break;
|
|
|
|
fi;
|
|
|
|
sleep 5;
|
|
|
|
done;
|
|
|
|
export DISPLAY=:0;
|
|
|
|
fi"
|
2021-02-01 10:42:43 +00:00
|
|
|
|
|
|
|
- "if sh $LAVA_TEST_SCRIPT; then
|
2021-04-16 22:18:07 +01:00
|
|
|
export RESULT=pass;
|
2020-01-28 14:19:53 +00:00
|
|
|
else
|
2021-04-16 22:18:07 +01:00
|
|
|
export RESULT=fail;
|
2020-01-28 14:19:53 +00:00
|
|
|
fi"
|
2021-04-16 22:18:07 +01:00
|
|
|
|
|
|
|
- "if [ -d results ]; then
|
|
|
|
tar -czf results.tar.gz results/;
|
|
|
|
ci-fairy minio login $CI_JOB_JWT;
|
2021-06-10 16:29:39 +01:00
|
|
|
ci-fairy minio cp results.tar.gz minio://${JOB_ARTIFACTS_BASE}/results.tar.gz;
|
2021-04-16 22:18:07 +01:00
|
|
|
fi"
|
|
|
|
|
|
|
|
- "echo mesa: $RESULT"
|
2020-01-28 14:19:53 +00:00
|
|
|
parse:
|
|
|
|
pattern: '(?P<test_case_id>\S*):\s+(?P<result>(pass|fail))'
|
|
|
|
from: inline
|
2021-02-01 10:42:43 +00:00
|
|
|
name: mesa
|
|
|
|
path: inline/mesa.yaml
|