Skip to content

Commit

Permalink
sort test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
nqb committed Dec 22, 2021
1 parent b351c1b commit 6dd436b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion t/venom/venom-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,20 @@ die_on_error() {
run_test_suites() {
local test_suites=$(readlink -e ${@:-.})
log_section "Running Venom test suite ${test_suites}"
CMD="${VENOM_BINARY} run ${VENOM_COMMON_FLAGS} ${VENOM_EXIT_FLAGS} ${test_suites}"

# empty array
test_suites_files=()
for test_suite in ${test_suites}; do
if [ -d "${test_suite}" ]; then
# add each file found to array
test_suites_files+=$(find ${test_suite} -type f -name "*.yml" | sort)
else
test_suites_files+=${test_suite}
fi
done
declare -p ${test_suites_files}

CMD="${VENOM_BINARY} run ${VENOM_COMMON_FLAGS} ${VENOM_EXIT_FLAGS} ${test_suites_files}"
${CMD} || die_on_error
}

Expand Down

0 comments on commit 6dd436b

Please sign in to comment.