diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 1a91f7a6e..d2cccdb4a 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -33,12 +33,15 @@ MEMCHECK=0 FILTER='.*' EXCLUDE='^$' +RUN_TEST_NUMBER='' + print_usage() { echo "Usage: $0 [options]" printf " -h|--help\tPrint this help.\n" printf " -m|--memcheck\tCheck memory leaks and errors.\n" printf " -f|--filter\tOnly matching tests are executed (default: '$FILTER')\n" printf " -e|--exclude\tMatching tests are excluded (default: '$EXCLUDE')\n" + printf " -n|--number\tExecute only numbered test (comma-separated, e.g. '245,256')\n" } get_options() { @@ -53,6 +56,9 @@ get_options() { -m|--memcheck) MEMCHECK=1 ;; + -n|--number) + shift; RUN_TEST_NUMBER=$1 + ;; -h|--help) print_usage exit 0 @@ -293,6 +299,13 @@ run_test() { print_name "$NAME" + # Do we only run numbered tests? + if [ "X$RUN_TEST_NUMBER" = "X" ]; then : + elif echo ",$RUN_TEST_NUMBER," | grep ",$TESTS," >/dev/null; then : + else + SKIP_NEXT="YES" + fi + # should we skip? if [ "X$SKIP_NEXT" = "XYES" ]; then SKIP_NEXT="NO"