Skip to content

Commit

Permalink
Show all tags in tests (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
manabuishii authored Jun 26, 2020
1 parent 55d371c commit a32bc53
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cwltest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
)
Expand Down Expand Up @@ -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"):
Expand Down

0 comments on commit a32bc53

Please sign in to comment.