From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/4] scripts/test_list.py: fix and simplify missing doc check
Date: Mon, 9 Oct 2023 12:01:38 +0200 [thread overview]
Message-ID: <20231009100332.392968-2-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20231009100332.392968-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Instead of using regexes, we can simply use sets to check what's
missing. I means an easier check and less error-prone.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/test_list.py | 34 ++++------------------------------
1 file changed, 4 insertions(+), 30 deletions(-)
diff --git a/scripts/test_list.py b/scripts/test_list.py
index daca290a02bd..c0462188ba8a 100644
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -1105,39 +1105,13 @@ class TestList:
doc_subtests.add(subtest)
- doc_subtests = list(sorted(doc_subtests))
-
# Get a list of tests from
- run_subtests = self.get_testlist()
+ run_subtests = set(self.get_testlist())
- # Compare arrays
+ # Compare sets
- run_missing = []
- doc_uneeded = []
-
- test_regex = r""
- for doc_test in doc_subtests:
- if test_regex != r"":
- test_regex += r"|"
- test_regex += doc_test
-
- test_regex = re.compile(r'^(' + test_regex + r')$')
-
- for doc_test in doc_subtests:
- found = False
- for run_test in run_subtests:
- if test_regex.match(run_test):
- found = True
- break
- if not found:
- doc_uneeded.append(doc_test)
-
- for run_test in run_subtests:
- found = False
- if test_regex.match(run_test):
- found = True
- if not found:
- run_missing.append(run_test)
+ run_missing = list(sorted(run_subtests - doc_subtests))
+ doc_uneeded = list(sorted(doc_subtests - run_subtests))
if doc_uneeded:
for test_name in doc_uneeded:
--
2.41.0
next prev parent reply other threads:[~2023-10-09 10:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 10:01 [igt-dev] [PATCH i-g-t 0/4] Fix bad documentation validation logic Mauro Carvalho Chehab
2023-10-09 10:01 ` Mauro Carvalho Chehab [this message]
2023-10-09 10:46 ` [igt-dev] [PATCH i-g-t 1/4] scripts/test_list.py: fix and simplify missing doc check Kamil Konieczny
2023-10-09 10:01 ` [igt-dev] [PATCH i-g-t 2/4] intel/xe_sysfs_scheduler.c: remove nonpriviledged-user tests Mauro Carvalho Chehab
2023-10-09 10:23 ` Kamil Konieczny
2023-10-09 10:01 ` [igt-dev] [PATCH i-g-t 3/4] intel/kms_big_fb.c: remove linear-addfb-size*-overflow docs Mauro Carvalho Chehab
2023-10-09 10:27 ` Kamil Konieczny
2023-10-09 10:01 ` [igt-dev] [PATCH i-g-t 4/4] intel/kms_frontbuffer_tracking.c: remove fbc-slowdraw test Mauro Carvalho Chehab
2023-10-09 10:30 ` Kamil Konieczny
2023-10-09 10:51 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix bad documentation validation logic Patchwork
2023-10-09 11:15 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-09 12:45 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-09 16:17 ` Kamil Konieczny
2023-10-10 9:32 ` Yedireswarapu, SaiX Nandan
2023-10-10 9:23 ` [igt-dev] ✓ Fi.CI.IGT: success " 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=20231009100332.392968-2-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