skip better

This commit is contained in:
Thomas Levine 2016-04-10 19:44:17 +00:00
parent e217d5a8fb
commit a97bb751bc

30
urchin
View File

@ -338,11 +338,11 @@ format_tap() {
n=$(( ${n:-0} + 1)) n=$(( ${n:-0} + 1))
case "${result}" in case "${result}" in
ok) echo "ok $n - ${path} (${the_shell}${remote})" ok) echo "ok $n - ${path} (${the_shell}${on})"
if "${print_ok_stdout}"; then print_stdout; fi ;; if "${print_ok_stdout}"; then print_stdout; fi ;;
not_ok) echo "not_ok $n - ${path} (${the_shell}${remote})" not_ok) echo "not_ok $n - ${path} (${the_shell}${on})"
if "${print_not_ok_stdout}"; then print_stdout; fi ;; if "${print_not_ok_stdout}"; then print_stdout; fi ;;
skip) "ok $n - ${path} (${the_shell}${remote}) # SKIP" ;; skip) "ok $n - ${path} (${the_shell}${on}) # SKIP" ;;
esac esac
echo "# Previous test took ${file_elapsed} seconds." echo "# Previous test took ${file_elapsed} seconds."
@ -387,21 +387,22 @@ format_urchin() {
while IFS="${HT}" read remote the_shell path result file_elapsed; do while IFS="${HT}" read remote the_shell path result file_elapsed; do
abspath=${urchin_tmp}/${path} abspath=${urchin_tmp}/${path}
currentdir="$(dirname -- "${path}")"
prevdir="${currentdir}"
# Format the message
if test -z "${remote}"; then if test -z "${remote}"; then
on=" on ${remote}" on=" on ${remote}"
else else
on= on=
fi fi
if test result = skip; then
currentdir="$(dirname -- "${path}")" parantheses="(skipped)"
prevdir="${currentdir}"
if test -z "${the_shell}"; then
message="(Skipped${on})"
else else
unit="$(plural second "${file_elapsed}")" parantheses="(${file_elapsed} $(plural second "${file_elapsed}"))"
message="${the_shell}${on} (${file_elapsed} ${unit})"
fi fi
message="${the_shell}${on} (${file_elapsed} ${unit})"
# Keep track of how many files have been ok, not ok, and skipped. # Keep track of how many files have been ok, not ok, and skipped.
eval "${result}s=$((${result}s+1))" eval "${result}s=$((${result}s+1))"
@ -568,9 +569,10 @@ recurse() {
wait wait
fi fi
else else
# Shell is '' because "File is not executable". # Skip because the file is not executable.
# Why does that happen? echo "${shell_list}" | while read sh; do
printf "\t\t${potential_test}\tskip\t0\n" >> "${urchin_tmp}"/log printf "\t${sh}\t${potential_test}\tskip\t0\n" >> "${urchin_tmp}"/log
done
fi fi
} }