gitlab-ci: Don't exclude any piglit quick_shader tests
[mesa.git] / .gitlab-ci / generate_lava.py
1 #!/usr/bin/env python3
2
3 from jinja2 import Environment, FileSystemLoader
4 import argparse
5
6 device_types = {
7 "sun50i-h6-pine-h64": {
8 "gpu_version": "panfrost-t720",
9 "boot_method": "u-boot",
10 "lava_device_type": "sun50i-h6-pine-h64",
11 "kernel_image_type": "type: image",
12 "tags": [],
13 },
14 "rk3288-veyron-jaq": {
15 "gpu_version": "panfrost-t760",
16 "boot_method": "depthcharge",
17 "lava_device_type": "rk3288-veyron-jaq",
18 "kernel_image_type": "",
19 "tags": [],
20 },
21 "rk3399-gru-kevin": {
22 "gpu_version": "panfrost-t860",
23 "boot_method": "depthcharge",
24 "lava_device_type": "rk3399-gru-kevin",
25 "kernel_image_type": "",
26 "tags": [],
27 },
28 "sun8i-h3-libretech-all-h3-cc": {
29 "gpu_version": "lima",
30 "boot_method": "u-boot",
31 "lava_device_type": "sun8i-h3-libretech-all-h3-cc",
32 "kernel_image_type": "type: zimage",
33 "tags": [],
34 },
35 "meson-gxl-s905x-libretech-cc": {
36 "gpu_version": "lima",
37 "boot_method": "u-boot",
38 "lava_device_type": "meson-gxl-s905x-libretech-cc",
39 "kernel_image_type": "type: image",
40 "tags": [],
41 },
42 "meson-gxm-khadas-vim2": {
43 "gpu_version": "panfrost-t820",
44 "boot_method": "u-boot",
45 "lava_device_type": "meson-gxm-khadas-vim2",
46 "kernel_image_type": "type: image",
47 "tags": ["panfrost"],
48 },
49 }
50
51 parser = argparse.ArgumentParser()
52 parser.add_argument("--template")
53 parser.add_argument("--base-artifacts-url")
54 parser.add_argument("--arch")
55 parser.add_argument("--device-types", nargs="+")
56 parser.add_argument("--kernel-image-name")
57 args = parser.parse_args()
58
59 env = Environment(loader = FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True)
60 template = env.get_template(args.template)
61
62 for device_type in args.device_types:
63 values = {}
64 values['base_artifacts_url'] = args.base_artifacts_url
65 values['arch'] = args.arch
66 values['device_type'] = device_type
67 values['kernel_image_name'] = args.kernel_image_name
68 values['lava_device_type'] = device_types[device_type]['lava_device_type']
69 values['gpu_version'] = device_types[device_type]['gpu_version']
70 values['boot_method'] = device_types[device_type]['boot_method']
71 values['kernel_image_type'] = device_types[device_type]['kernel_image_type']
72 values['tags'] = device_types[device_type]['tags']
73
74 f = open('results/lava-deqp-%s.yml' % device_type, "w")
75 f.write(template.render(values))
76 f.close()
77