Skip to content

Commit bce4ea0

Browse files
rupertnashmr-c
authored andcommitted
allow test exclusion by name and number
1 parent 664835e commit bce4ea0

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
@@ -8,7 +8,10 @@ Syntax:
88
[EXTRA=--optional-arguments-to-cwl-runner]
99
1010
Options:
11-
-nT Run a specific test.
11+
-ntest_range Run specific test(s) by number (format "1,2-4,7")
12+
-Ntest_range Exclude specific test(s) by number (format "1,2-4,7")
13+
-stest_names Run specific test(s) by name (format "test_a,test_b")
14+
-Stest_names Exclude specific test(s) by name (format "test_a,test_b")
1215
-l List tests
1316
-jJ Specifies the number of tests to run simultaneously
1417
(defaults to one).
@@ -25,7 +28,10 @@ Note:
2528
Example: RUNNER=cwltool EXTRA=--enable-dev
2629
EOF
2730

31+
TEST_n=""
2832
TEST_N=""
33+
TEST_s=""
34+
TEST_S=""
2935
JUNIT_XML=""
3036
RUNNER=cwl-runner
3137
PLATFORM=$(uname -s)
@@ -44,8 +50,17 @@ do
4450
exit 1
4551
;;
4652
-n*)
47-
TEST_N=$arg
53+
TEST_n=$arg
4854
;;
55+
-N*)
56+
TEST_N=$arg
57+
;;
58+
-s*)
59+
TEST_s=$arg
60+
;;
61+
-S*)
62+
TEST_S=$arg
63+
;;
4964
-j*)
5065
TEST_J=$arg
5166
;;
@@ -93,7 +108,8 @@ runtest() {
93108

94109
runs=$((runs+1))
95110
(COMMAND="cwltest --tool $1 \
96-
--test=conformance_tests.yaml ${CLASS} ${TEST_N} \
111+
--test=conformance_tests.yaml ${CLASS} \
112+
${TEST_n} ${TEST_N} ${TEST_s} ${TEST_S} \
97113
${VERBOSE} ${TEST_L} ${TEST_J} ${ONLY_TOOLS} ${JUNIT_XML} \
98114
-- ${EXTRA}"
99115
if [[ $VERBOSE == "--verbose" ]]; then echo ${COMMAND}; fi

0 commit comments

Comments
 (0)