Skip to content

Commit 07aa928

Browse files
author
Peter Amstutz
committed
Add -l to cwltest to list tests.
1 parent 7939429 commit 07aa928

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cwltool/cwltest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def main():
135135
parser = argparse.ArgumentParser(description='Compliance tests for cwltool')
136136
parser.add_argument("--test", type=str, help="YAML file describing test cases", required=True)
137137
parser.add_argument("--basedir", type=str, help="Basedir to use for tests", default=".")
138+
parser.add_argument("-l", action="store_true", help="List tests then exit")
138139
parser.add_argument("-n", type=int, default=None, help="Run a specific test")
139140
parser.add_argument("--tool", type=str, default="cwl-runner",
140141
help="CWL runner executable to use (default 'cwl-runner'")
@@ -161,6 +162,11 @@ def main():
161162
if cwl["class"] == "CommandLineTool":
162163
tests.append(t)
163164

165+
if args.l:
166+
for i, t in enumerate(tests):
167+
print "[%i] %s" % (i+1, t["doc"].strip())
168+
return 1
169+
164170
if args.n is not None:
165171
sys.stderr.write("\rTest [%i/%i] " % (args.n, len(tests)))
166172
rt = run_test(args, args.n-1, tests[args.n-1])

0 commit comments

Comments
 (0)