From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t v2 3/4] scripts/igt_doc.py: fix trivial case handling
Date: Thu, 22 Feb 2024 12:45:27 +0100 [thread overview]
Message-ID: <20240222114741.196042-4-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20240222114741.196042-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
The check is done too late, causing it to not do what it was
expected: instead of checking for the gpu_set, it shall instead
check if the subnames dict is empty.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/igt_doc.py | 37 +++++++++++++++++--------------------
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
index 7985cdd5ac5e..2417081b80be 100755
--- a/scripts/igt_doc.py
+++ b/scripts/igt_doc.py
@@ -20,6 +20,7 @@ from test_list import TestList
class IgtTestList(TestList):
def __init__(self, *args, **kwargs):
self.split_regex = re.compile(r",\s*")
+ self.default_gpu = "default"
super().__init__(*args, **kwargs)
@@ -122,30 +123,33 @@ class IgtTestList(TestList):
# Create a testlist dictionary
testlists = {}
- default_gpu = "default"
for driver, run_types in tests_per_list.items():
testlists[driver] = {}
+ testlists[driver][self.default_gpu] = {}
+
for run_type, subnames in run_types.items():
-
if not run_type:
run_type = "other"
+ if run_type not in testlists[driver][self.default_gpu]:
+ testlists[driver][self.default_gpu][run_type] = set()
+
for subname, gpus in subnames.items():
# Globally blocklisted values: ignore subtest
if "all" in tests_per_list[driver][run_type][subname]:
continue
- # Trivial case: fields not defined: add subtest
- if not gpu_set:
- if default_gpu not in testlists[driver]:
- testlists[driver][default_gpu] = {}
+ # If GPU field is used, default is to block list
+ default_gpu_value = True
+ for gpu, value in gpus.items():
+ if value:
+ default_gpu_value = False
+ break
- if run_type not in testlists[driver][default_gpu]:
- testlists[driver][default_gpu][run_type] = set()
-
- testlists[driver][default_gpu][run_type].add(subname)
- continue
+ # Fill default values
+ if default_gpu_value:
+ testlists[driver][self.default_gpu][run_type].add(subname)
if not gpus:
for gpu in gpu_set:
@@ -163,13 +167,6 @@ class IgtTestList(TestList):
testlists[driver][gpu][run_type].add(subname)
continue
- # If GPU field is used, default is to block list
- default_gpu_value = True
- for gpu, value in gpus.items():
- if value:
- default_gpu_value = False
- break
-
for gpu in gpu_set:
value = tests_per_list[driver][run_type][subname].get(gpu, default_gpu_value)
@@ -184,8 +181,8 @@ class IgtTestList(TestList):
testlists[driver][gpu][run_type].add(subname)
- if len(gpu_set) == 0:
- gpu_set.add(default_gpu)
+ # Always create a default GPU
+ gpu_set.add(self.default_gpu)
return (testlists, gpu_set)
--
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 ` Mauro Carvalho Chehab [this message]
2024-02-26 11:04 ` [PATCH i-g-t v2 3/4] scripts/igt_doc.py: fix trivial case handling Kamil Konieczny
2024-02-22 11:45 ` [PATCH i-g-t v2 4/4] scripts/igt_doc.py: fix intelci testlist join logic Mauro Carvalho Chehab
2024-02-26 11:06 ` 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-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