public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t] .gitlab-ci: Fix listing undocumented subtests
Date: Mon, 9 Sep 2019 11:39:17 +0300	[thread overview]
Message-ID: <20190909083917.3378-1-arkadiusz.hiler@intel.com> (raw)

Looking at this code:

  description = ""
  current_subtest = None

  for line in proc.stdout.decode().splitlines():
  if line.startswith("SUB "):
      output += [Subtest(current_subtest, description)]

So if there is no documentation on the top level we will get subtest ==
None and description == "".

Let's check for those properly so we won't falsely flag the whole binary.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
---
 .gitlab-ci/list_undocumented_tests.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci/list_undocumented_tests.py b/.gitlab-ci/list_undocumented_tests.py
index 0ce3f330..d6bb0a5c 100755
--- a/.gitlab-ci/list_undocumented_tests.py
+++ b/.gitlab-ci/list_undocumented_tests.py
@@ -47,13 +47,11 @@ def main():
     for test in tests:
         subtests = get_subtests(testdir, test)
 
-        if subtests and subtests[0].name is None:
-            # top level description missing, list binary
-            print(test)
-
         for name, description in subtests:
-            if name is None: # top level description, skipping
-                continue
+            if name is None: # top level description
+                if not description: # is empty
+                    print(test) # mention the test binary
+                continue # and skip because it's not a subtest
 
             if "NO DOCUMENTATION!" in description:
                 print("{}@{}".format(test, name))
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-09-09  8:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  8:39 Arkadiusz Hiler [this message]
2019-09-09  9:26 ` [igt-dev] ✓ Fi.CI.BAT: success for .gitlab-ci: Fix listing undocumented subtests Patchwork
2019-09-09 12:55 ` [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=20190909083917.3378-1-arkadiusz.hiler@intel.com \
    --to=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    /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