Skip to content

Commit

Permalink
allow test exclusion by name and number
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertnash authored and mr-c committed Apr 23, 2021
1 parent 664835e commit bce4ea0
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ Syntax:
[EXTRA=--optional-arguments-to-cwl-runner]
Options:
-nT Run a specific test.
-ntest_range Run specific test(s) by number (format "1,2-4,7")
-Ntest_range Exclude specific test(s) by number (format "1,2-4,7")
-stest_names Run specific test(s) by name (format "test_a,test_b")
-Stest_names Exclude specific test(s) by name (format "test_a,test_b")
-l List tests
-jJ Specifies the number of tests to run simultaneously
(defaults to one).
Expand All @@ -25,7 +28,10 @@ Note:
Example: RUNNER=cwltool EXTRA=--enable-dev
EOF

TEST_n=""
TEST_N=""
TEST_s=""
TEST_S=""
JUNIT_XML=""
RUNNER=cwl-runner
PLATFORM=$(uname -s)
Expand All @@ -44,8 +50,17 @@ do
exit 1
;;
-n*)
TEST_N=$arg
TEST_n=$arg
;;
-N*)
TEST_N=$arg
;;
-s*)
TEST_s=$arg
;;
-S*)
TEST_S=$arg
;;
-j*)
TEST_J=$arg
;;
Expand Down Expand Up @@ -93,7 +108,8 @@ runtest() {

runs=$((runs+1))
(COMMAND="cwltest --tool $1 \
--test=conformance_tests.yaml ${CLASS} ${TEST_N} \
--test=conformance_tests.yaml ${CLASS} \
${TEST_n} ${TEST_N} ${TEST_s} ${TEST_S} \
${VERBOSE} ${TEST_L} ${TEST_J} ${ONLY_TOOLS} ${JUNIT_XML} \
-- ${EXTRA}"
if [[ $VERBOSE == "--verbose" ]]; then echo ${COMMAND}; fi
Expand Down

0 comments on commit bce4ea0

Please sign in to comment.