[LTP] [PATCH 2/2] doc: conf.py: Show groups in test catalog
Andrea Cervesato
andrea.cervesato@suse.de
Fri Jun 12 15:54:15 CEST 2026
From: Andrea Cervesato <andrea.cervesato@suse.com>
Display the groups field from metadata in the generated test catalog
pages. Groups appear after the source link and before the test
description.
Filter out @group tag lines from the test description to avoid
duplication since they are already shown in the groups list.
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
doc/conf.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/doc/conf.py b/doc/conf.py
index 591c1534dfa7e54b816e88b9eca1dd7fb91df255..bf2eaa898ac49debee88ccc1d26a584ffe20bb7d 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -394,6 +394,7 @@ def _generate_setup_table(keys):
'needs_checkpoints',
'forks_child',
'tags',
+ 'groups',
]
my_keys = {k: v for k, v in keys.items() if k not in exclude}
if len(my_keys) == 0:
@@ -482,11 +483,22 @@ def generate_test_catalog(_):
''
])
- # test description
+ # groups information
+ groups = conf.get('groups', None)
+ if groups:
+ text.extend([
+ '',
+ f"**Groups**: {', '.join(groups)}",
+ ''
+ ])
+
+ # test description (filter out @group tags)
desc = conf.get('doc', None)
if desc:
desc_text = []
for line in desc:
+ if line.lstrip().startswith('@group '):
+ continue
line = regexp.sub(r'**\1**', line)
desc_text.append(line)
--
2.51.0
More information about the ltp
mailing list