Mesa (main): radeonsi/test: allow to pass a filename as a test filter value
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 12 10:03:59 UTC 2021
Module: Mesa
Branch: main
Commit: 66709f1a40624407c5dc2ad64fc130f79e6ecc08
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=66709f1a40624407c5dc2ad64fc130f79e6ecc08
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Tue Aug 10 15:25:22 2021 +0200
radeonsi/test: allow to pass a filename as a test filter value
This allows this pattern:
$ radeonsi-run-tests.py /tmp/foo
... reports that some piglit tests regressed ...
$ radeonsi-run-tests.py -t /tmp/foo/new_baseline/sienna_cichlid-piglit-quick-fail.csv
... this only runs the test that regressed ...
Acked-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12306>
---
.../drivers/radeonsi/ci/radeonsi-run-tests.py | 32 +++++++++++++++++-----
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py
index 0a2b36f6cdc..d7fbebac27c 100755
--- a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py
+++ b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py
@@ -32,6 +32,7 @@ import tempfile
import itertools
import filecmp
import multiprocessing
+import csv
def print_red(txt, end_line=True):
@@ -61,7 +62,12 @@ parser.add_argument(
)
parser.add_argument("--verbose", "-v", action="count", default=0)
parser.add_argument(
- "--include-tests", "-t", action="append", dest="include_tests", default=[]
+ "--include-tests",
+ "-t",
+ action="append",
+ dest="include_tests",
+ default=[],
+ help="Only run the test matching this expression. This can only be a filename containing a list of failing tests to re-run.",
)
parser.add_argument(
@@ -199,6 +205,20 @@ def verify_results(baseline1, baseline2):
return True
+def parse_test_filters(include_tests):
+ cmd = []
+ for t in include_tests:
+ if os.path.exists(t):
+ with open(t, "r") as file:
+ for row in csv.reader(file, delimiter=","):
+ cmd += ["-t", row[0]]
+ else:
+ cmd += ["-t", t]
+ return cmd
+
+
+filters_args = parse_test_filters(args.include_tests)
+
# piglit test
if args.piglit:
out = os.path.join(output_folder, "piglit")
@@ -223,9 +243,8 @@ if args.piglit:
str(args.jobs),
"--skips",
skips,
- ]
- for t in args.include_tests:
- cmd += ["-t", t]
+ ] + filters_args
+
if os.path.exists(baseline):
cmd += ["--baseline", baseline]
env = os.environ.copy()
@@ -265,9 +284,8 @@ if args.glcts:
str(args.jobs),
"--timeout",
"1000",
- ]
- for t in args.include_tests:
- cmd += ["-t", t]
+ ] + filters_args
+
if os.path.exists(baseline):
cmd += ["--baseline", baseline]
cmd += deqp_args
More information about the mesa-commit
mailing list