From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t v2 4/4] scripts/igt_doc.py: fix intelci testlist join logic
Date: Thu, 22 Feb 2024 12:45:28 +0100 [thread overview]
Message-ID: <20240222114741.196042-5-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20240222114741.196042-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Joining testlists shall take into account default values for GPUs
that are defined only on some JSON config files.
Add a logic to propagate such values.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/igt_doc.py | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
index 2417081b80be..295589c002c6 100755
--- a/scripts/igt_doc.py
+++ b/scripts/igt_doc.py
@@ -190,10 +190,10 @@ class IntelciTestlist:
def __init__(self):
self.testlists = {}
self.gpu_set = set()
+ self.default_gpu = "default"
def add(self, testlist, gpu_set):
- self.gpu_set.update(gpu_set)
-
+ # Handle GPUs found at the set to be added
for driver, gpus in testlist.items():
if driver not in self.testlists:
self.testlists[driver] = {}
@@ -208,6 +208,26 @@ class IntelciTestlist:
self.testlists[driver][gpu][run_type].update(testlist[driver][gpu][run_type])
+ # Apply default values to gpus that aren't in common
+ if self.gpu_set:
+ not_intersecting_gpus = self.gpu_set.symmetric_difference(gpu_set)
+
+ for driver in self.testlists.keys():
+ for gpu in not_intersecting_gpus:
+ if gpu not in self.testlists[driver]:
+ self.testlists[driver][gpu] = {}
+
+ for run_type in self.testlists[driver][gpu].keys():
+ if run_type not in self.testlists[driver][self.default_gpu]:
+ continue
+
+ default_list = self.testlists[driver][self.default_gpu][run_type]
+
+ self.testlists[driver][gpu][run_type].update(default_list)
+
+ self.gpu_set.update(gpu_set)
+
+
def write(self, directory):
'''Create testlist directory (if needed) and files'''
--
2.43.2
next prev parent reply other threads:[~2024-02-22 11:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 11:45 [PATCH i-g-t v2 0/4] Additional fixes for IntelCI testlist generation Mauro Carvalho Chehab
2024-02-22 11:45 ` [PATCH i-g-t v2 1/4] scripts/igt_doc.py: fix intelci testlist generation for complex cases Mauro Carvalho Chehab
2024-02-26 10:54 ` Kamil Konieczny
2024-02-22 11:45 ` [PATCH i-g-t v2 2/4] scripts/igt_doc.py: ignore "all" when producing testlists Mauro Carvalho Chehab
2024-02-26 10:58 ` Kamil Konieczny
2024-02-22 11:45 ` [PATCH i-g-t v2 3/4] scripts/igt_doc.py: fix trivial case handling Mauro Carvalho Chehab
2024-02-26 11:04 ` Kamil Konieczny
2024-02-22 11:45 ` Mauro Carvalho Chehab [this message]
2024-02-26 11:06 ` [PATCH i-g-t v2 4/4] scripts/igt_doc.py: fix intelci testlist join logic Kamil Konieczny
2024-02-22 12:52 ` ✓ CI.xeBAT: success for Additional fixes for IntelCI testlist generation (rev2) Patchwork
2024-02-22 13:17 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-02-26 11:09 ` Kamil Konieczny
2024-02-28 5:58 ` Illipilli, TejasreeX
2024-02-28 5:56 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-28 16:00 ` ✗ 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=20240222114741.196042-5-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