From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-renesas-soc@vger.kernel.org
Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: [kms-tests] [PATCH] kmstest: Add support for specifying subset of tests on the command line
Date: Tue, 14 Nov 2023 15:39:29 +0200 [thread overview]
Message-ID: <20231114133929.26419-1-laurent.pinchart@ideasonboard.com> (raw)
The kmstest.py runner is a convenient way to run all the tests in the
current directory, in addition to running specific tests manually. It is
also useful to run a subset of the tests. Add support for this by
specifying them as command line arguments to kmstest.py.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
tests/kmstest.py | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/tests/kmstest.py b/tests/kmstest.py
index 4bd4e0ad27a6..a86d689347d9 100755
--- a/tests/kmstest.py
+++ b/tests/kmstest.py
@@ -549,14 +549,23 @@ class KMSTest(object):
if __name__ == '__main__':
+ import argparse
import importlib
import inspect
import os
+ import sys
- files = []
- for path in os.scandir():
- if path.is_file() and path.name.startswith('kms-test-') and path.name.endswith('.py'):
- files.append(path.name)
+ parser = argparse.ArgumentParser()
+ parser.add_argument('test', type=str, nargs='*', help='Tests files')
+ args = parser.parse_args(sys.argv[1:])
+
+ if args.test:
+ files = args.test
+ else:
+ files = []
+ for path in os.scandir():
+ if path.is_file() and path.name.startswith('kms-test-') and path.name.endswith('.py'):
+ files.append(path.name)
files.sort()
for file in files:
base-commit: 2264236eefd15450320c0cdb34fa07ac0881f713
--
Regards,
Laurent Pinchart
reply other threads:[~2023-11-14 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231114133929.26419-1-laurent.pinchart@ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=tomi.valkeinen@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.