radeonsi/test: allow to specify a baseline folder
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 21 Sep 2021 16:37:09 +0000 (18:37 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Sep 2021 11:10:48 +0000 (11:10 +0000)
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13021>

src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py

index f9a68bf..7d61a5d 100755 (executable)
@@ -73,7 +73,11 @@ parser.add_argument(
     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(
+    "--baseline",
+    dest="baseline",
+    help="Folder containing expected results files",
+    default=os.path.dirname(__file__))
 parser.add_argument(
     "--no-piglit", dest="piglit", help="Disable piglit tests", action="store_false"
 )
@@ -138,8 +142,8 @@ else:
         parser.print_help()
         sys.exit(0)
 
-base = os.path.dirname(__file__)
-skips = os.path.join(base, "skips.csv")
+base = args.baseline
+skips = os.path.join(os.path.dirname(__file__), "skips.csv")
 
 # Use piglit's glinfo to determine the GPU name
 gpu_name = "unknown"
@@ -261,6 +265,7 @@ if args.piglit:
 
     if os.path.exists(baseline):
         cmd += ["--baseline", baseline]
+        print_yellow("[baseline {}]".format(baseline), args.verbose > 0)
     env = os.environ.copy()
     env["PIGLIT_PLATFORM"] = "gbm"
     run_cmd(cmd, args.verbose, env)
@@ -302,6 +307,7 @@ if args.glcts:
 
     if os.path.exists(baseline):
         cmd += ["--baseline", baseline]
+        print_yellow("[baseline {}]".format(baseline), args.verbose > 0)
     cmd += deqp_args
     run_cmd(cmd, args.verbose)
     shutil.copy(os.path.join(out, "failures.csv"), new_baseline)
@@ -320,6 +326,9 @@ if args.deqp:
         new_baseline_folder, "{}-deqp-fail.csv".format(gpu_name)
     )
 
+    if os.path.exists(baseline):
+        print_yellow("[baseline {}]".format(baseline), args.verbose > 0)
+
     deqp_tests = {
         "egl": args.deqp_egl,
         "gles2": args.deqp_gles2,