Skip to content

Commit a2a41ff

Browse files
rupertnashmr-c
authored andcommitted
allow test exclusion by name and number
1 parent ea9f863 commit a2a41ff

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

run_test.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ Syntax:
1111
[EXTRA=--optional-arguments-to-cwl-runner]
1212
1313
Options:
14-
-nT Run a specific test.
14+
-ntest_range Run specific test(s) by number (format "1,2-4,7")
15+
-Ntest_range Exclude specific test(s) by number (format "1,2-4,7")
16+
-stest_names Run specific test(s) by name (format "test_a,test_b")
17+
-Stest_names Exclude specific test(s) by name (format "test_a,test_b")
1518
-l List tests
1619
-jJ Specifies the number of tests to run simultaneously
1720
(defaults to one).
@@ -34,7 +37,10 @@ Note:
3437
EOF
3538

3639
CWL_VER=v1.2
40+
TEST_n=""
3741
TEST_N=""
42+
TEST_s=""
43+
TEST_S=""
3844
JUNIT_XML=""
3945
RUNNER=cwl-runner
4046
PLATFORM=$(uname -s)
@@ -56,8 +62,17 @@ do
5662
exit 1
5763
;;
5864
-n*)
59-
TEST_N=$arg
65+
TEST_n=$arg
6066
;;
67+
-N*)
68+
TEST_N=$arg
69+
;;
70+
-s*)
71+
TEST_s=$arg
72+
;;
73+
-S*)
74+
TEST_S=$arg
75+
;;
6176
-j*)
6277
TEST_J=$arg
6378
;;
@@ -130,7 +145,8 @@ runtest() {
130145

131146
runs=$((runs+1))
132147
(COMMAND="cwltest --tool $1 \
133-
--test=conformance_tests.yaml ${CLASS} ${TEST_N} \
148+
--test=conformance_tests.yaml ${CLASS} \
149+
${TEST_n} ${TEST_N} ${TEST_s} ${TEST_S} \
134150
${VERBOSE} ${TEST_L} ${TEST_J} ${ONLY_TOOLS} ${JUNIT_XML} \
135151
${TIMEOUT} ${BADGE} ${TAGS} -- ${EXTRA}"
136152
if [ "$VERBOSE" = "--verbose" ]; then echo "${COMMAND}"; fi

0 commit comments

Comments
 (0)