From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH RFC 3/3] igt_doc: ensure that the driver name will be there
Date: Tue, 28 Nov 2023 17:43:03 +0100 [thread overview]
Message-ID: <20231128164551.77343-4-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20231128164551.77343-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/igt_doc.py | 22 ++++++++++++++++++----
scripts/test_list.py | 5 +++++
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
index a807d2bb373d..c982a97148c9 100755
--- a/scripts/igt_doc.py
+++ b/scripts/igt_doc.py
@@ -61,9 +61,20 @@ class IgtTestList(TestList):
split_regex = re.compile(r",\s*")
for subname, subtest in subtest_dict.items():
- run_type = subtest.get("Run type", "other")
+ run_types = subtest.get("Run type", "other")
+ run_type_set = set(split_regex.split(run_types))
+
+ run_type_set = set()
+ for run_type in set(split_regex.split(run_types)):
+ run_type = run_type.lower()
+
+ if run_type.startswith(tuple(self.drivers)):
+ run_type_set.add(run_type)
+ else:
+ for driver in self.drivers:
+ run_type = f"{driver.lower()}_{run_type}"
+ run_type_set.add(run_type)
- run_type_set = set(split_regex.split(run_type))
for run_type in run_type_set:
if run_type not in tests_per_list:
tests_per_list[run_type] = {}
@@ -126,10 +137,10 @@ class IgtTestList(TestList):
for subname, gpu_dict in tests_per_list[run_type].items():
for gpu, value in gpu_dict.items():
run_name = re.sub(r"[\W_]+", "-", run_type)
- gpu = re.sub(r"[\W_]+", "-", gpu)
+ gpu = re.sub(r"[\W_]+", "-", gpu).lower()
if gpus:
- name = f"{run_name}_{gpu}".lower()
+ name = f"{run_name}_{gpu}"
else:
name = run_name.lower()
@@ -148,6 +159,9 @@ class IgtTestList(TestList):
if testlist == "":
testlist = "other"
+ if not subtests:
+ print(f"Warning: empty testlist: {testlist}")
+ continue
fname = os.path.join(directory, testlist) + ".testlist"
with open(fname, 'w', encoding='utf8') as handler:
diff --git a/scripts/test_list.py b/scripts/test_list.py
index 36eea5fb1c76..1164f5bc40df 100644
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -292,6 +292,11 @@ class TestList:
self.driver_name = driver_name
+ if "drivers" in self.config:
+ self.drivers = self.config["drivers"]
+ else:
+ self.drivers = [driver_name]
+
if sources_path:
cfg_path = os.path.realpath(sources_path) + "/"
--
2.42.0
next prev parent reply other threads:[~2023-11-28 16:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 16:43 [igt-dev] [PATCH RFC 0/3] Produce per-GPU testlists for IntelCI Mauro Carvalho Chehab
2023-11-28 16:43 ` [igt-dev] [PATCH RFC 1/3] tests/intel: *.json: specify what drivers use such tests Mauro Carvalho Chehab
2023-11-29 12:28 ` Kamil Konieczny
2023-11-28 16:43 ` [igt-dev] [PATCH RFC 2/3] scripts/igt_doc.py: add a logic to generate Intel CI testlists Mauro Carvalho Chehab
2023-11-29 12:47 ` Kamil Konieczny
2023-11-28 16:43 ` Mauro Carvalho Chehab [this message]
2023-11-29 13:00 ` [igt-dev] [PATCH RFC 3/3] igt_doc: ensure that the driver name will be there Kamil Konieczny
2023-11-28 21:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Produce per-GPU testlists for IntelCI Patchwork
2023-11-28 22:03 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-29 2:34 ` [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=20231128164551.77343-4-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