summaryrefslogtreecommitdiff
path: root/.gitlab-ci/lava-tracie.yml.jinja2
blob: 660ecfd6535c545e48361d9e9bb733b5b91aae93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
job_name: mesa-tracie-{{ 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: public
{% 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: tracie
          description: "Mesa tracie 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

          # amdgpu failed to find its firmware during boot, rebind
          - echo 0000:00:01.0 > /sys/bus/pci/drivers/amdgpu/bind || true

{% if env_vars %}
          - export {{ env_vars }}
{% endif %}
          # tracie-runner.sh assumes some stuff is in pwd
          - cd /

          - wget -S --progress=dot:giga -O- {{ mesa_url }} | tar -xz

          - export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
          - export LIBGL_DRIVERS_PATH=`pwd`/install/lib/dri
          - export DEVICE_NAME="gl-{{ gpu_version }}"

          - "if sh /install/tracie-runner-gl.sh; then
                  echo 'tracie: pass';
             else
                  echo 'tracie: fail';
             fi"
        parse:
          pattern: '(?P<test_case_id>\S*):\s+(?P<result>(pass|fail))'
      from: inline
      name: tracie
      path: inline/mesa-tracie.yaml