From a32bc53c2382808390bcb9028766b68c5d60e24e Mon Sep 17 00:00:00 2001 From: Manabu ISHII Date: Fri, 26 Jun 2020 20:25:02 +0900 Subject: [PATCH] Show all tags in tests (#88) --- cwltest/__init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cwltest/__init__.py b/cwltest/__init__.py index 1638611..d192298 100755 --- a/cwltest/__init__.py +++ b/cwltest/__init__.py @@ -9,7 +9,7 @@ import tempfile import threading import time -from typing import Any, Dict, List, Optional, Text, Union +from typing import Any, Dict, List, Optional, Set, Text, Union from concurrent.futures import ThreadPoolExecutor from collections import defaultdict from rdflib import Graph @@ -280,6 +280,7 @@ def arg_parser(): # type: () -> argparse.ArgumentParser "--only-tools", action="store_true", help="Only test CommandLineTools" ) parser.add_argument("--tags", type=str, default=None, help="Tags to be tested") + parser.add_argument("--show-tags", action="store_true", help="Show all Tags.") parser.add_argument( "--junit-xml", type=str, default=None, help="Path to JUnit xml file" ) @@ -406,6 +407,15 @@ def main(): # type: () -> int if t.get("label"): t["short_name"] = t["label"] + if args.show_tags: + alltags = set() # type: Set[str] + for t in tests: + ts = t.get("tags", []) + alltags |= set(ts) + for tag in alltags: + print(tag) + return 0 + if args.l: for i, t in enumerate(tests): if t.get("short_name"):