X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Faggregate-results.sh;h=b016edb9117108523642b17862b20846f4fbc89c;hp=cc5b83fbaac9a3b6980341fd2e62d9cab24c98cb;hb=71521f06b00a01c5b0eaea5f5f624fe57ed7f426;hpb=222926abe1e221a6239ccb9436968af43e1b6fb2 diff --git a/test/aggregate-results.sh b/test/aggregate-results.sh index cc5b83fb..b016edb9 100755 --- a/test/aggregate-results.sh +++ b/test/aggregate-results.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/usr/bin/env bash + +set -eu fixed=0 success=0 @@ -49,7 +51,7 @@ pluralize () { } echo "Notmuch test suite complete." -if [ "$fixed" = "0" ] && [ "$broken" = "0" ]; then +if [ "$fixed" = "0" ] && [ "$failed" = "0" ]; then tests=$(pluralize "test" $total) printf "All $total $tests " if [ "$broken" = "0" ]; then @@ -79,3 +81,10 @@ if [ "$skipped" != "0" ]; then tests=$(pluralize "test" $skipped) echo "$skipped $tests skipped." fi + +if [ $success -gt 0 -a $fixed -eq 0 -a $failed -eq 0 -a $skipped -eq 0 ] +then + exit 0 +else + exit 1 +fi