[PATCH i-g-t v3 2/8] scripts/igt_doc.py: better handle issues with empty testlists
Mauro Carvalho Chehab
mauro.chehab at linux.intel.com
Fri Feb 9 12:34:41 UTC 2024
From: Mauro Carvalho Chehab <mchehab at kernel.org>
The warning message of not creating an empty testlist is
harmless, and it should only be used when not all GPUs
are listed. So, change the logic to better check for "other"
testlists before printing a message.
Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
---
scripts/igt_doc.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
index 6a1cfc2b5a56..a6cbeee067fe 100755
--- a/scripts/igt_doc.py
+++ b/scripts/igt_doc.py
@@ -218,16 +218,14 @@ class IntelciTestlist:
for testlist, subtests in names.items():
if testlist == "":
- if not subtests:
- continue
-
testlist = "other"
else:
testlist = re.sub(r"[\W_]+", "-", testlist).lower()
testlist = re.sub(r"_+", "_", testlist)
if not subtests:
- sys.stderr.write(f"Warning: empty testlist: {testlist}\n")
+ if testlist != "other":
+ sys.stderr.write(f"Not creating empty testlist: {dname}/{testlist}\n")
continue
fname = os.path.join(dname, testlist) + ".testlist"
--
2.43.0
More information about the igt-dev
mailing list