summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@kernel.org>2024-02-08 14:30:57 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2024-02-09 14:36:06 +0100
commitb23ff26edb3f1dda6a56516665157a5d28670fb7 (patch)
tree5d9e8cd284d5773c712f39af04e17f5be2d230bb /scripts
parent00ec683ab1c008c9fd6d3c87fa8c7a79520dbe18 (diff)
scripts/igt_doc.py: simplify and cleanup tests_per_list logic
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> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/igt_doc.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
index bf51e5f4e..70b753885 100755
--- a/scripts/igt_doc.py
+++ b/scripts/igt_doc.py
@@ -61,33 +61,33 @@ 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] = {}