15 if [ ! -f "$file" ]; then
16 echo "'$file' does not exist!"
17 rep_failed=$((rep_failed + 1))
25 fixed=$((fixed + value)) ;;
27 success=$((success + value)) ;;
29 failed=$((failed + value)) ;;
31 broken=$((broken + value)) ;;
33 total=$((total + value))
35 if [ "$value" -eq 0 ]; then
36 all_skipped=$((all_skipped + 1))
40 if [ "$has_total" -eq 0 ]; then
41 echo "'$file' lacks 'total ...'; results may be inconsistent."
42 failed=$((failed + 1))
46 pluralize_s () { [ "$1" -eq 1 ] && s='' || s='s'; }
48 echo "Notmuch test suite complete."
50 if [ "$fixed" -eq 0 ] && [ "$failed" -eq 0 ] && [ "$rep_failed" -eq 0 ]; then
52 printf "All $total test$s "
53 if [ "$broken" -eq 0 ]; then
57 echo "behaved as expected ($broken expected failure$s)."
60 echo "$success/$total tests passed."
61 if [ "$broken" -ne 0 ]; then
63 echo "$broken broken test$s failed as expected."
65 if [ "$fixed" -ne 0 ]; then
67 echo "$fixed broken test$s now fixed."
69 if [ "$failed" -ne 0 ]; then
71 echo "$failed test$s failed."
75 skipped=$((total - fixed - success - failed - broken))
76 if [ "$skipped" -ne 0 ]; then
77 pluralize_s "$skipped"
78 echo "$skipped test$s skipped."
80 if [ "$all_skipped" -ne 0 ]; then
81 pluralize_s "$all_skipped"
82 echo "All tests in $all_skipped file$s skipped."
85 if [ "$rep_failed" -ne 0 ]; then
86 pluralize_s "$rep_failed"
87 echo "$rep_failed test$s failed to report results."
90 # Note that we currently do not consider skipped tests as failing the
93 if [ "$success" -gt 0 ] && [ "$fixed" -eq 0 ] &&
94 [ "$failed" -eq 0 ] && [ "$rep_failed" -eq 0 ]