Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2 08/12] scripts/test_list.py: add support for igt_simple_main
Date: Thu, 30 Mar 2023 07:42:17 +0200	[thread overview]
Message-ID: <20230330054221.2640814-9-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20230330054221.2640814-1-mauro.chehab@linux.intel.com>

From: Mauro Carvalho Chehab <mchehab@kernel.org>

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 <mchehab@kernel.org>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
 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

  parent reply	other threads:[~2023-03-30  5:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30  5:42 [igt-dev] [PATCH i-g-t v2 00/12] Improve igt_doc.py Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 01/12] xe_test_config.json: do some adjustments at the output hierarchy Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 02/12] scripts/igt_doc.py: move show_subtests logic to the class Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 03/12] scripts/igt_doc.py: add support to generate testlists Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 04/12] scripts/igt_doc.py: prepare to place TestList class on a separate file Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 05/12] scripts/test_list.py: prepare to place " Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 06/12] scripts/igt_doc.py: re-introduce it by calling test_list.py Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 07/12] scripts/test_list.py: better handle documentation validation issues Mauro Carvalho Chehab
2023-03-30  5:42 ` Mauro Carvalho Chehab [this message]
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 09/12] testplan/meson.build: Validate documentation at build time Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 10/12] xe/xe_vm: add documentation for igt@xe_vm@userptr-invalid Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 11/12] xe/xe_noexec_ping_pong: document subtest Mauro Carvalho Chehab
2023-03-30  5:42 ` [igt-dev] [PATCH i-g-t v2 12/12] runner/meson.build: fix minimal build Mauro Carvalho Chehab
2023-03-31  9:13   ` Kamil Konieczny
2023-03-31 10:39     ` Mauro Carvalho Chehab
2023-03-31 10:46       ` Mauro Carvalho Chehab
2023-03-31 11:10       ` Kamil Konieczny
2023-03-30  6:25 ` [igt-dev] ✗ GitLab.Pipeline: warning for Improve igt_doc.py (rev2) Patchwork
2023-03-30  6:42 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-03-31  1:46 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230330054221.2640814-9-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