import itertools
import filecmp
import multiprocessing
+import csv
def print_red(txt, end_line=True):
)
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(
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")
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()
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