@@ -25,7 +25,8 @@ Options:
2525 CLASSNAME
2626 --timeout=TIMEOUT cwltest timeout in seconds.
2727 --verbose Print the cwltest invocation and pass --verbose to
28- cwltest
28+ cwltest (or if running the "--self" check, print the
29+ schema-salad-tool invocation)
2930 --self Test CWL and test .cwl files themselves. If this flag
3031 is given, any other flags will be ignored.
3132 --badgedir=DIRNAME Specifies the directory to store JSON files for badges.
@@ -116,15 +117,13 @@ if [ -n "${SELF}" ]; then
116117 fi
117118 # This is how CWL should be written.
118119 DEFINITION=./CommonWorkflowLanguage.yml
119- # Let's test each files
120- find tests -type f -name " *.cwl" | \
121- while read -r target;
122- do
123- schema-salad-tool ${DEFINITION} " ${target} " --quiet || {
124- echo " [INVALID] ${target} "
125- exit 1
126- }
127- done
120+ QUIET=--quiet
121+ if [ " $VERBOSE " = " --verbose" ]; then
122+ QUIET=
123+ fi
124+ # Let's test all the files at once as that is faster
125+ schema-salad-tool ${QUIET} ${DEFINITION} \
126+ $( find tests -type f -name " *.cwl" ) || exit 1
128127 exit 0
129128fi
130129
@@ -162,7 +161,7 @@ runtest() {
162161if [ " $PLATFORM " = " Linux" ]; then
163162 runtest " $( readlink -f " $runner " ) "
164163elif [ " $PLATFORM " = " Darwin" ]; then
165- runtest $runner
164+ runtest " $runner "
166165else
167166 runtest " $( greadlink -f " $runner " ) "
168167fi
0 commit comments