From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65AB310E075 for ; Thu, 30 Mar 2023 05:42:28 +0000 (UTC) Received: from linux.intel.com (mwrzeszc-mobl1.ger.corp.intel.com [10.252.27.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id D9705580D2C for ; Wed, 29 Mar 2023 22:42:26 -0700 (PDT) Received: from maurocar by linux.intel.com with local (Exim 4.96) (envelope-from ) id 1phl3I-00B510-2s for igt-dev@lists.freedesktop.org; Thu, 30 Mar 2023 07:42:24 +0200 From: Mauro Carvalho Chehab To: igt-dev@lists.freedesktop.org Date: Thu, 30 Mar 2023 07:42:17 +0200 Message-Id: <20230330054221.2640814-9-mauro.chehab@linux.intel.com> In-Reply-To: <20230330054221.2640814-1-mauro.chehab@linux.intel.com> References: <20230330054221.2640814-1-mauro.chehab@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v2 08/12] scripts/test_list.py: add support for igt_simple_main List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Mauro Carvalho Chehab when igt_simple_main is used, there will be a single unamed subtest. Add support for it. On such case, the documentation will be like: /** * TEST: Test foo * Category: Software building block * Sub-category: foo * Test category: functionality test * Run type: BAT * * SUBTEST: * Description: foo description */ Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Kamil Konieczny --- scripts/test_list.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/test_list.py b/scripts/test_list.py index 7d35deda3329..075f44d5e604 100755 --- a/scripts/test_list.py +++ b/scripts/test_list.py @@ -176,6 +176,22 @@ class TestList: The SUBTEST contains the fields that are specific to each subtest. + Note: when igt_simple_main is used, there will be a single nameless + subtest. On such case, "SUBTEST:" is still needed, but without a + test name on it, e. g., it would be documented as: + + /** + * TEST: some test that uses igt_simple_main + * Category: Software build block + * Sub-category: documentation + * Functionality: test documentation + * Issue: none + * Description: Complete description of this test + * + * SUBTEST: + * Description: do foo things + */ + Some IGT tests may have strings or integer wildcards, like: test-%s-%ld-size @@ -376,8 +392,9 @@ class TestList: subtest_array = [] for subtest in self.doc[test]["subtest"].keys(): - summary = test_name + '@' + self.doc[test]["subtest"][subtest]["Summary"] - + summary = test_name + if self.doc[test]["subtest"][subtest]["Summary"] != '': + summary += '@' + self.doc[test]["subtest"][subtest]["Summary"] if not summary: continue -- 2.39.2