From 1380f3ae56689ae5b8512e564d04e187af9cb60a Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Mon, 9 Sep 2019 10:55:14 +0300 Subject: .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 Reviewed-by: Petri Latvala --- .gitlab-ci/list_undocumented_tests.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to '.gitlab-ci') 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)) -- cgit v1.2.3