From: Russ Cox Date: Wed, 16 Nov 2011 23:44:21 +0000 (-0500) Subject: gofmt: do not stop test.sh after 1 error X-Git-Tag: weekly.2011-11-18~25 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4d27f64863ab8518f4ac9f20539bd20c16e77433;p=gostls13.git gofmt: do not stop test.sh after 1 error Fix bug377.go to be gofmt-compliant. R=gri, r, r CC=golang-dev https://golang.org/cl/5400045 --- diff --git a/src/cmd/gofmt/test.sh b/src/cmd/gofmt/test.sh index d130aee1ac..2325d6b835 100755 --- a/src/cmd/gofmt/test.sh +++ b/src/cmd/gofmt/test.sh @@ -14,6 +14,7 @@ TMP1=test_tmp1.go TMP2=test_tmp2.go TMP3=test_tmp3.go COUNT=0 +rm -f _failed count() { #echo $1 @@ -27,10 +28,9 @@ count() { error() { echo $1 - exit 1 + touch _failed } - # apply to one file apply1() { # the following files are skipped because they are test cases @@ -157,6 +157,11 @@ runtests() { runtests "$@" cleanup +if [ -f _failed ]; then + rm _failed + exit 1 +fi + # done echo echo "PASSED ($COUNT tests)" diff --git a/test/fixedbugs/bug377.go b/test/fixedbugs/bug377.go index b6b5509fb6..e905e34d68 100644 --- a/test/fixedbugs/bug377.go +++ b/test/fixedbugs/bug377.go @@ -6,4 +6,4 @@ // Issue 1802 -ignored +package ignored