From 7594d4ae2c5d53c3fa905f88f56b8aedf62f2e22 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 24 Sep 2021 11:05:07 +0200 Subject: [PATCH] radeonsi/test: add sanity checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verify that DISPLAY is there and deqp-runner is at least 0.9. Acked-by: Marek Olšák Part-of: --- .../drivers/radeonsi/ci/radeonsi-run-tests.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py index 0bf53f5cf1f..81f55a68440 100755 --- a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py +++ b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py @@ -165,6 +165,26 @@ base = args.baseline skips = os.path.join(os.path.dirname(__file__), "skips.csv") env = os.environ.copy() + +if "DISPLAY" not in env: + print_red("DISPLAY environment variable missing.") + sys.exit(1) +p = subprocess.run( + ["deqp-runner", "--version"], + capture_output="True", + check=True, + env=env +) +for line in p.stdout.decode().split("\n"): + if line.find("deqp-runner") >= 0: + s = line.split(" ")[1].split(".") + if args.verbose > 1: + print("Checking deqp-version ({})".format(s)) + # We want at least 0.9.0 + if not (int(s[0]) > 0 or int(s[1]) >= 9): + print("Expecting deqp-runner 0.9.0+ version (got {})".format(".".join(s))) + sys.exit(1) + env["PIGLIT_PLATFORM"] = "gbm" if "DRI_PRIME" in env: