diff --git a/mugen.sh b/mugen.sh index 366ca90e262..e3256ac8aa8 100644 --- a/mugen.sh +++ b/mugen.sh @@ -328,7 +328,7 @@ function run_test_suite() { } function run_all_cases() { - mapfile -t test_suites < <(find "${OET_PATH}"/suite2cases/ -type f -name "*.json" | awk -F '/' '{print $NF}' | sed -e 's/.json$//g') + mapfile -t test_suites < <(find "${OET_PATH}"/suite2cases/ -type f -name "*.json" | awk -F '/' '{print $NF}' | sed -e 's/.json$//g' | sort -u) test ${#test_suites[@]} -eq 0 && { LOG_ERROR "Can't find recording about test_suites." return 1 @@ -339,7 +339,7 @@ function run_all_cases() { local this_copy=true fi - for test_suite in ${test_suites[*]}; do + for test_suite in "${test_suites[@]}"; do run_test_suite "$test_suite" COPY_DONE="no" local this_copy=true