test.do (564B)
1 redo-ifchange slweb 2 testdir=tests 3 cat <<! >&2 4 TEST RESULTS 5 =========================================================== 6 ! 7 error='' 8 find "$testdir" -type f -perm +a+x -exec {} \; | 9 awk 'BEGIN { FS="\t"; maxlen = 60; status = 0 } 10 { 11 printf "%s%*s%s\n", $1, maxlen-5-length($1), " ", $2; 12 if ($2 == "FAIL") 13 status = 1 14 } 15 END { exit status }' >&2 || error=1 16 cat <<! >&2 17 =========================================================== 18 ! 19 if [ -n "$error" ]; then 20 printf "Some tests were unsuccessful - please report\n" >&2 21 exit 99 22 else 23 printf "All tests passed\n" >&2 24 fi