summaryrefslogtreecommitdiff
path: root/.gitlab-ci
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-09-09 10:55:14 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-09-09 13:12:00 +0300
commit1380f3ae56689ae5b8512e564d04e187af9cb60a (patch)
treecca0f36455c6041491b430b39eb73fc63c104c30 /.gitlab-ci
parent93f9f35554b0152cb5648b4671407511d760b5f8 (diff)
.gitlab-ci: Fix listing undocumented subtests
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>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x.gitlab-ci/list_undocumented_tests.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/.gitlab-ci/list_undocumented_tests.py b/.gitlab-ci/list_undocumented_tests.py
index 0ce3f3307..d6bb0a5cd 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))