public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] .gitlab-ci: Fix listing undocumented subtests
@ 2019-09-09  8:39 Arkadiusz Hiler
  2019-09-09  9:26 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-09-09 12:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Arkadiusz Hiler @ 2019-09-09  8:39 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-09 12:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-09  8:39 [igt-dev] [PATCH i-g-t] .gitlab-ci: Fix listing undocumented subtests Arkadiusz Hiler
2019-09-09  9:26 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-09-09 12:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox