From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2 2/2] scripts/test_list.py: add a check for missing features
Date: Thu, 10 Aug 2023 17:10:31 +0200 [thread overview]
Message-ID: <20230810151303.1338975-3-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20230810151303.1338975-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Some fields shall always be present at the documentation.
Add a check for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/test_list.py | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/scripts/test_list.py b/scripts/test_list.py
index 4f580fb3de58..c23d6d735edf 100755
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -936,13 +936,27 @@ class TestList:
if self.filters:
print("NOTE: test checks are affected by filters")
+ mandatory_fields = set()
+ for field, item in self.props.items():
+ if item["_properties_"].get("mandatory"):
+ mandatory_fields.add(field)
+
doc_subtests = set()
args_regex = re.compile(r'\<[^\>]+\>')
- for subtest in self.get_subtests()[""]:
+ missing_mandatory_fields = False
+
+ subtests = self.expand_dictionary(True)
+ for subtest, data in sorted(subtests.items()):
subtest = "@".join(subtest.split("@")[:3])
subtest = args_regex.sub(r'\\d+', subtest)
+
+ for field in mandatory_fields:
+ if field not in data:
+ print(f"Warning: {subtest} {field} documentation is missing")
+ missing_mandatory_fields = True
+
doc_subtests.add(subtest)
doc_subtests = list(sorted(doc_subtests))
--
2.41.0
next prev parent reply other threads:[~2023-08-10 15:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 15:10 [igt-dev] [PATCH i-g-t v2 0/2] Validate Xe field descriptions at build time Mauro Carvalho Chehab
2023-08-10 15:10 ` [igt-dev] [PATCH i-g-t v2 1/2] xe_test_config.json: mark some fields are mandatory at subtest level Mauro Carvalho Chehab
2023-08-10 19:06 ` Kamil Konieczny
2023-08-10 15:10 ` Mauro Carvalho Chehab [this message]
2023-08-10 19:07 ` [igt-dev] [PATCH i-g-t v2 2/2] scripts/test_list.py: add a check for missing features Kamil Konieczny
2023-08-10 16:42 ` [igt-dev] ✗ Fi.CI.BAT: failure for Validate Xe field descriptions at build time (rev2) Patchwork
2023-08-10 19:09 ` Kamil Konieczny
2023-08-11 9:24 ` Yedireswarapu, SaiX Nandan
2023-08-10 17:45 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-11 7:20 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-12 8:46 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20230810151303.1338975-3-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