From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t v2 8/8] scripts/igt_doc.py: simplify and cleanup tests_per_list logic
Date: Fri, 9 Feb 2024 12:49:57 +0100 [thread overview]
Message-ID: <20240209115101.285319-9-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20240209115101.285319-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Re-do the logic which calculates tests_per_list dict inside
gen_intelci_testlist():
- better handle "other" runtype;
- better handle driver name discovery logic.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/igt_doc.py | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
index bf51e5f4ebb3..1b4f7eafd135 100755
--- a/scripts/igt_doc.py
+++ b/scripts/igt_doc.py
@@ -61,36 +61,35 @@ class IgtTestList(TestList):
split_regex = re.compile(r",\s*")
for subname, subtest in subtest_dict.items():
- run_types = subtest.get("Run type", "other")
- run_type_set = set(split_regex.split(run_types))
-
+ run_types = subtest.get("Run type", "other").lower()
+ drivers = set()
run_type_set = set()
for run_type in set(split_regex.split(run_types)):
- run_type = run_type.lower()
-
- drivers = set(self.drivers)
for driver in self.drivers:
- driver = driver.lower()
-
if run_type.startswith(driver):
run_type = re.sub(r"^" + driver + r"[\W_]*", "", run_type)
drivers = set([driver])
break
+ if not drivers:
+ drivers.update(self.drivers)
+
+ if not run_type:
+ run_type = "other"
+
run_type_set.add(run_type)
+ if not drivers:
+ drivers = set(self.drivers)
+
for driver in drivers:
if driver not in tests_per_list:
tests_per_list[driver] = {}
for run_type in run_type_set:
- if not run_type:
- run_type = "other"
-
if run_type not in tests_per_list[driver]:
tests_per_list[driver][run_type] = {}
-
if subname not in tests_per_list[driver][run_type]:
tests_per_list[driver][run_type][subname] = {}
--
2.43.0
next prev parent reply other threads:[~2024-02-09 11:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 11:49 [PATCH i-g-t v2 0/8] Fix several issues when producing Intel CI testlists Mauro Carvalho Chehab
2024-02-09 11:49 ` [PATCH i-g-t v2 1/8] scripts/test_list.py: fix a typo on default-if-not-excluded Mauro Carvalho Chehab
2024-02-09 11:49 ` [PATCH i-g-t v2 2/8] scripts/igt_doc.py: better handle issues with empty testlists Mauro Carvalho Chehab
2024-02-09 11:49 ` [PATCH i-g-t v2 3/8] scripts/igt_doc.py: handle empty run_type Mauro Carvalho Chehab
2024-02-09 11:49 ` [PATCH i-g-t v2 4/8] scripts/igt_doc.py: only create dict if subtest will be added Mauro Carvalho Chehab
2024-02-09 11:49 ` [PATCH i-g-t v2 5/8] scripts/igt_doc.py: better handle default gpu Mauro Carvalho Chehab
2024-02-09 11:49 ` [PATCH i-g-t v2 6/8] scripts/igt_doc.py: remove some unused logic Mauro Carvalho Chehab
2024-02-09 11:49 ` [PATCH i-g-t v2 7/8] scripts/igt_doc.py: use an ancillary function to simplify the code Mauro Carvalho Chehab
2024-02-09 11:49 ` Mauro Carvalho Chehab [this message]
2024-02-09 12:06 ` ✗ Fi.CI.BUILD: failure for Fix several issues when producing Intel CI testlists (rev2) 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=20240209115101.285319-9-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