make quick-verify: make the output a bit more readable by showing script names without full paths.

This commit is contained in:
Slava Semushin 2017-11-21 19:12:26 +01:00
parent ec036d9c0e
commit 97bb6cb9c7

View File

@ -92,24 +92,26 @@ function run-checks {
local -r pattern=$1 local -r pattern=$1
local -r runner=$2 local -r runner=$2
local t
for t in $(ls ${pattern}) for t in $(ls ${pattern})
do do
local check_name="$(basename "${t}")"
if is-excluded "${t}" ; then if is-excluded "${t}" ; then
echo "Skipping ${t}" echo "Skipping ${check_name}"
continue continue
fi fi
if ${QUICK} && ! is-quick "${t}" ; then if ${QUICK} && ! is-quick "${t}" ; then
echo "Skipping ${t} in quick mode" echo "Skipping ${check_name} in quick mode"
continue continue
fi fi
echo -e "Verifying ${t}" echo -e "Verifying ${check_name}"
local start=$(date +%s) local start=$(date +%s)
run-cmd "${runner}" "${t}" && tr=$? || tr=$? run-cmd "${runner}" "${t}" && tr=$? || tr=$?
local elapsed=$(($(date +%s) - ${start})) local elapsed=$(($(date +%s) - ${start}))
if [[ ${tr} -eq 0 ]]; then if [[ ${tr} -eq 0 ]]; then
echo -e "${color_green}SUCCESS${color_norm} ${t}\t${elapsed}s" echo -e "${color_green}SUCCESS${color_norm} ${check_name}\t${elapsed}s"
else else
echo -e "${color_red}FAILED${color_norm} ${t}\t${elapsed}s" echo -e "${color_red}FAILED${color_norm} ${check_name}\t${elapsed}s"
ret=1 ret=1
FAILED_TESTS+=(${t}) FAILED_TESTS+=(${t})
fi fi