Skip to content

Commit

Permalink
runtests: add tests-guest/tests-gnr/tests-spr support
Browse files Browse the repository at this point in the history
As before runtests could only support tests-client and tests-server,
now it could support tests-guest/tests-gnr/tests-spr and so on test files.

Signed-off-by: Pengfei Xu <[email protected]>
  • Loading branch information
xupengfe committed May 30, 2024
1 parent ef69935 commit 7fae4ec
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions BM/runtests
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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"

Expand All @@ -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
Expand Down

0 comments on commit 7fae4ec

Please sign in to comment.