3 from jinja2
import Environment
, FileSystemLoader
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",
13 "rk3288-veyron-jaq": {
14 "gpu_version": "panfrost-t760",
15 "boot_method": "depthcharge",
16 "lava_device_type": "rk3288-veyron-jaq",
17 "kernel_image_type": "",
20 "gpu_version": "panfrost-t860",
21 "boot_method": "depthcharge",
22 "lava_device_type": "rk3399-gru-kevin",
23 "kernel_image_type": "",
25 "sun8i-h3-libretech-all-h3-cc": {
26 "gpu_version": "lima",
27 "boot_method": "u-boot",
28 "lava_device_type": "sun8i-h3-libretech-all-h3-cc",
29 "kernel_image_type": "type: zimage",
31 "meson-gxl-s905x-libretech-cc": {
32 "gpu_version": "lima",
33 "boot_method": "u-boot",
34 "lava_device_type": "meson-gxl-s905x-libretech-cc",
35 "kernel_image_type": "type: image",
39 parser
= argparse
.ArgumentParser()
40 parser
.add_argument("--template")
41 parser
.add_argument("--base-artifacts-url")
42 parser
.add_argument("--arch")
43 parser
.add_argument("--device-types", nargs
="+")
44 parser
.add_argument("--kernel-image-name")
45 args
= parser
.parse_args()
47 env
= Environment(loader
= FileSystemLoader('.'), trim_blocks
=True, lstrip_blocks
=True)
48 template
= env
.get_template(args
.template
)
50 for device_type
in args
.device_types
:
52 values
['base_artifacts_url'] = args
.base_artifacts_url
53 values
['arch'] = args
.arch
54 values
['device_type'] = device_type
55 values
['kernel_image_name'] = args
.kernel_image_name
56 values
['lava_device_type'] = device_types
[device_type
]['lava_device_type']
57 values
['gpu_version'] = device_types
[device_type
]['gpu_version']
58 values
['boot_method'] = device_types
[device_type
]['boot_method']
59 values
['kernel_image_type'] = device_types
[device_type
]['kernel_image_type']
61 f
= open('results/lava-deqp-%s.yml' % device_type
, "w")
62 f
.write(template
.render(values
))