From 22d976454f4e50142116f4544c0bbf11134ce991 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 17 Dec 2019 11:50:14 +0100 Subject: gitlab-ci: Consolidate container and build stages for LAVA Use the normal build job to also prepare the artifacts for LAVA jobs. For that, the build container needs to also build the test suites, kernel, ramdisk, etc. Then the build job will place the just-built Mesa in the ramdisk and the test job can generate a LAVA job and point to those artifacts. Signed-off-by: Tomeu Vizoso Acked-by: Alyssa Rosenzweig Reviewed-by: Daniel Stone Tested-by: Marge Bot Part-of: --- .gitlab-ci/generate_lava.py | 91 +++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 66 deletions(-) (limited to '.gitlab-ci/generate_lava.py') diff --git a/.gitlab-ci/generate_lava.py b/.gitlab-ci/generate_lava.py index 46bc2e1f5c8..f83f0e8d4d3 100755 --- a/.gitlab-ci/generate_lava.py +++ b/.gitlab-ci/generate_lava.py @@ -2,79 +2,38 @@ from jinja2 import Environment, FileSystemLoader import argparse - -device_types = { - "sun50i-h6-pine-h64": { - "gpu_version": "panfrost-t720", - "boot_method": "u-boot", - "lava_device_type": "sun50i-h6-pine-h64", - "kernel_image_type": "type: image", - "tags": [], - }, - "rk3288-veyron-jaq": { - "gpu_version": "panfrost-t760", - "boot_method": "depthcharge", - "lava_device_type": "rk3288-veyron-jaq", - "kernel_image_type": "", - "tags": [], - }, - "rk3399-gru-kevin": { - "gpu_version": "panfrost-t860", - "boot_method": "depthcharge", - "lava_device_type": "rk3399-gru-kevin", - "kernel_image_type": "", - "tags": [], - }, - "sun8i-h3-libretech-all-h3-cc": { - "gpu_version": "lima", - "boot_method": "u-boot", - "lava_device_type": "sun8i-h3-libretech-all-h3-cc", - "kernel_image_type": "type: zimage", - "tags": [], - }, - "meson-gxl-s905x-libretech-cc": { - "gpu_version": "lima", - "boot_method": "u-boot", - "lava_device_type": "meson-gxl-s905x-libretech-cc", - "kernel_image_type": "type: image", - "tags": [], - }, - "meson-gxm-khadas-vim2": { - "gpu_version": "panfrost-t820", - "boot_method": "u-boot", - "lava_device_type": "meson-gxm-khadas-vim2", - "kernel_image_type": "type: image", - "tags": ["panfrost"], - }, -} +import os parser = argparse.ArgumentParser() parser.add_argument("--template") parser.add_argument("--base-artifacts-url") -parser.add_argument("--arch") -parser.add_argument("--device-types", nargs="+") +parser.add_argument("--device-type") parser.add_argument("--kernel-image-name") +parser.add_argument("--kernel-image-type", nargs='?', default="") +parser.add_argument("--gpu-version") +parser.add_argument("--boot-method") +parser.add_argument("--lava-tags", nargs='?', default="") +parser.add_argument("--env-vars", nargs='?', default="") +parser.add_argument("--deqp-version") +parser.add_argument("--arch") args = parser.parse_args() -env = Environment(loader = FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True) -template = env.get_template(args.template) +env = Environment(loader = FileSystemLoader(os.path.dirname(args.template)), trim_blocks=True, lstrip_blocks=True) +template = env.get_template(os.path.basename(args.template)) -for device_type in args.device_types: - values = {} - values['base_artifacts_url'] = args.base_artifacts_url - values['arch'] = args.arch - values['device_type'] = device_type - values['kernel_image_name'] = args.kernel_image_name - values['lava_device_type'] = device_types[device_type]['lava_device_type'] - values['gpu_version'] = device_types[device_type]['gpu_version'] - values['boot_method'] = device_types[device_type]['boot_method'] - values['kernel_image_type'] = device_types[device_type]['kernel_image_type'] - values['tags'] = device_types[device_type]['tags'] - values['fails_file'] = 'deqp-%s-fails.txt' % device_types[device_type]['gpu_version'] - values['skips_file'] = 'deqp-%s-skips.txt' % device_types[device_type]['gpu_version'] - values['deqp_version'] = 'gles2' +values = {} +values['base_artifacts_url'] = args.base_artifacts_url +values['device_type'] = args.device_type +values['kernel_image_name'] = args.kernel_image_name +values['kernel_image_type'] = args.kernel_image_type +values['gpu_version'] = args.gpu_version +values['boot_method'] = args.boot_method +values['tags'] = args.lava_tags +values['env_vars'] = args.env_vars +values['deqp_version'] = args.deqp_version +values['arch'] = args.arch - f = open('results/lava-deqp-%s.yml' % device_type, "w") - f.write(template.render(values)) - f.close() +f = open('lava-deqp.yml', "w") +f.write(template.render(values)) +f.close() -- cgit v1.2.3