From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] scripts/test_list.py: add support to exclude files
Date: Fri, 5 May 2023 08:19:56 +0200 [thread overview]
Message-ID: <20230505061956.272476-1-mauro.chehab@linux.intel.com> (raw)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Specially when using wildcards, it is interesting to have a
way to exclude some files. This is needed to support some kms
helper functions that, instead of being part of the IGT library,
are stored inside the tests sub-directories.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/test_list.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/scripts/test_list.py b/scripts/test_list.py
index 2a53d782a4a0..c9dbf144da1e 100755
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -208,6 +208,7 @@ class TestList:
{
"files": [ "tests/driver/*.c" ],
+ "exclude_files": [ "tests/driver/*-helper.c" ],
"fields": {
"Category": {
"Sub-category": {
@@ -302,10 +303,19 @@ class TestList:
has_implemented = False
if not self.filenames:
self.filenames = []
+ exclude_files = []
files = self.config["files"]
+ exclude_file_glob = self.config.get("exclude_files", [])
+ for cfg_file in exclude_file_glob:
+ cfg_file = os.path.realpath(os.path.dirname(config_fname)) + "/" + cfg_file
+ for fname in glob.glob(cfg_file):
+ exclude_files.append(fname)
+
for cfg_file in files:
cfg_file = os.path.realpath(os.path.dirname(config_fname)) + "/" + cfg_file
for fname in glob.glob(cfg_file):
+ if fname in exclude_files:
+ continue
self.filenames.append(fname)
has_implemented = True
else:
--
2.40.1
next reply other threads:[~2023-05-05 6:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 6:19 Mauro Carvalho Chehab [this message]
2023-05-05 8:08 ` [igt-dev] ✓ Fi.CI.BAT: success for scripts/test_list.py: add support to exclude files Patchwork
2023-05-05 23:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20230505061956.272476-1-mauro.chehab@linux.intel.com \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox