diff --git a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py index 825e6a6e2cd..2685ea1704e 100755 --- a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py +++ b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py @@ -251,14 +251,19 @@ skips_list = os.path.normpath(os.path.join(os.path.dirname(__file__), skips_list env_glinfo = dict(env) env_glinfo["AMD_DEBUG"] = "info" -p = subprocess.run( - ["./glinfo"], - capture_output="True", - cwd=os.path.join(piglit_path, "bin"), - check=True, - env=env_glinfo, -) +try: + p = subprocess.run( + ["./glinfo"], + capture_output="True", + cwd=os.path.join(piglit_path, "bin"), + check=True, + env=env_glinfo, + ) +except subprocess.CalledProcessError: + print('piglit/bin/glinfo failed to create a GL context') + exit(1) +renderer = None for line in p.stdout.decode().split("\n"): if "GL_RENDER" in line: line = line.split("=")[1] @@ -270,6 +275,10 @@ for line in p.stdout.decode().split("\n"): elif "gfx_level" in line: gfx_level = int(line.split("=")[1]) +if renderer is None: + print('piglit/bin/glinfo failed to create a GL context') + exit(1) + output_folder = args.output_folder if is_amd: print_green("Tested GPU: '{}' ({}) {}".format(gpu_name_full, gpu_name, gpu_device))