radeonsi: add -t option to the test script
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 5 Aug 2021 14:03:38 +0000 (16:03 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Aug 2021 10:11:58 +0000 (10:11 +0000)
This allows to easily run a subset of the tests without having
to figure out which test suite(s) they belong to.

dEQP cannot use this option because currently "deqp-runner suite"
don't have it.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12215>

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

index f9ff04f..78b1428 100755 (executable)
@@ -51,6 +51,7 @@ parser.add_argument(
     default=os.getenv("MAREKO_BUILD_PATH"),
 )
 parser.add_argument('--verbose', '-v', action='count', default=0)
+parser.add_argument('--include-tests', '-t', action='append', dest="include_tests")
 
 parser.add_argument(
     "--no-piglit", dest="piglit", help="Disable piglit tests", action="store_false"
@@ -192,6 +193,8 @@ if args.piglit:
             '--timeout', '300',
             '--jobs', str(args.jobs),
             '--skips', skips]
+    for t in args.include_tests:
+        cmd += ['-t', t]
     if os.path.exists(baseline):
         cmd += ['--baseline', baseline]
     env = os.environ.copy()
@@ -218,6 +221,8 @@ if args.glcts:
             '--skips', skips,
             '--jobs', str(args.jobs),
             '--timeout', '1000']
+    for t in args.include_tests:
+        cmd += ['-t', t]
     if os.path.exists(baseline):
         cmd += ['--baseline', baseline]
     cmd += deqp_args
@@ -226,6 +231,10 @@ if args.glcts:
     verify_results(baseline, new_baseline)
 
 if args.deqp:
+    if args.include_tests:
+        print_yellow('dEQP tests cannot be run with the -t/--include-tests option yet.')
+        sys.exit(0)
+
     print_yellow('Running   dEQP tests', args.verbose > 0)
 
     # Generate a test-suite file