diff --git a/BM/runtests b/BM/runtests index 468279ec..9f5575e5 100755 --- a/BM/runtests +++ b/BM/runtests @@ -18,8 +18,6 @@ DEP_EXIT=$PASS_CODE START_TIME="" SUMMRY_LOG="" -TESTS_CLIENT="tests-client" -TESTS_SERVER="tests-server" TEST_FILES="" SUB_FOLDERS="" TEST_LIST_FILE="/tmp/tests" @@ -332,7 +330,7 @@ prepare_files_list() { done } -test_all() { +list_all_test_files() { local test_file_type=$1 # Don't quote */, otherwise it could not list all folders. @@ -406,8 +404,9 @@ while getopts ":o:d:f:c:h" opt; do d) init_dep_log "$DEP_LOG" CMDFILES=$OPTARG - [[ "$CMDFILES" == "$TESTS_CLIENT" ]] && test_all "$TESTS_CLIENT" - [[ "$CMDFILES" == "$TESTS_SERVER" ]] && test_all "$TESTS_SERVER" + # If tests-server type will list tests-server in all subfolders + [[ "$CMDFILES" == *"-"* ]] && list_all_test_files "$CMDFILES" + for cmdfile in $(tr "," " " <<< "$CMDFILES"); do check_test_file_legal "$cmdfile" @@ -422,8 +421,8 @@ while getopts ":o:d:f:c:h" opt; do ;; f) CMDFILES=$OPTARG - [[ "$CMDFILES" == "$TESTS_CLIENT" ]] && test_all "$TESTS_CLIENT" - [[ "$CMDFILES" == "$TESTS_SERVER" ]] && test_all "$TESTS_SERVER" + # If tests-server type will list tests-server in all subfolders + [[ "$CMDFILES" == *"-"* ]] && list_all_test_files "$CMDFILES" ;; c) CMDLINE=$OPTARG