From efd696afb9f13ce530092b0108f0539df7bbd253 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 7 Jan 2022 15:58:55 +0100 Subject: [PATCH] New option to list all test cases Occasionally useful for diagnosing issues with test reports. Signed-off-by: Gilles Peskine --- tests/scripts/check_test_cases.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/scripts/check_test_cases.py b/tests/scripts/check_test_cases.py index eaf48302a0..c9f5e11dd8 100755 --- a/tests/scripts/check_test_cases.py +++ b/tests/scripts/check_test_cases.py @@ -193,6 +193,9 @@ class DescriptionChecker(TestDescriptionExplorer): def main(): parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--list-all', + action='store_true', + help='List all test cases, without doing checks') parser.add_argument('--quiet', '-q', action='store_true', help='Hide warnings') @@ -200,6 +203,10 @@ def main(): action='store_false', dest='quiet', help='Show warnings (default: on; undoes --quiet)') options = parser.parse_args() + if options.list_all: + descriptions = collect_available_test_cases() + sys.stdout.write('\n'.join(descriptions + [''])) + return results = Results(options) checker = DescriptionChecker(results) checker.walk_all()