From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t v2 4/8] scripts/igt_doc.py: only create dict if subtest will be added
Date: Fri, 9 Feb 2024 12:49:53 +0100 [thread overview]
Message-ID: <20240209115101.285319-5-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20240209115101.285319-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Currently, depending on the order of the sets/dict, some
empty testlists are created. Change the logic to only add
an entry into the dict if a subtest will be added to it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
scripts/igt_doc.py | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
index 8a10db13081c..1c2c7a8ef973 100755
--- a/scripts/igt_doc.py
+++ b/scripts/igt_doc.py
@@ -116,31 +116,31 @@ class IgtTestList(TestList):
run_type = "other"
for subname, gpus in subnames.items():
- if not gpu_set:
- gpu = "default"
-
- if gpu not in testlists[driver]:
- testlists[driver][gpu] = {}
-
- if run_type not in testlists[driver][gpu]:
- testlists[driver][gpu][run_type] = set()
-
- # Trivial case: fields not defined
- if not gpu_set:
- testlists[driver][gpu][run_type].add(subname)
- continue
-
- # Globally blocklisted values
+ # Globally blocklisted values: ignore subtest
if "all" in tests_per_list[driver][run_type][subname]:
continue
- # Nothing blocked of explicitly added.
- # It means that test should be on testlists
+ if not gpu_set:
+ gpu = "default"
+
+ # Trivial case: fields not defined: add subtest
+ if not gpu_set:
+ if gpu not in testlists[driver]:
+ testlists[driver][gpu] = {}
+
+ if run_type not in testlists[driver][gpu]:
+ testlists[driver][gpu][run_type] = set()
+
+ testlists[driver][gpu][run_type].add(subname)
+ continue
+
if not gpus:
for gpu in gpu_set:
+ # blocked on all GPUs: ignore subtest
if gpu == "all":
continue
+ # Nothing blocked: add subtest
if gpu not in testlists[driver]:
testlists[driver][gpu] = {}
--
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 ` Mauro Carvalho Chehab [this message]
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 ` [PATCH i-g-t v2 8/8] scripts/igt_doc.py: simplify and cleanup tests_per_list logic Mauro Carvalho Chehab
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-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