Re: [PATCH] Do not ignore errors during make check
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 14, 2005, 21:30 UTC
- Message-ID
- <7v1x0fxt7b.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20051214210932.GA2642@kvasir.watson.ibm.com>
Amos Waterland <apw@us.ibm.com> writes:
Show 5 quoted lines
> Do not let errors pass by unnoticed when running `make check'. > ... > check: > - for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done > + for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || break; done
Good point but "|| exit" would be more appropriate. With the above patch, I suspect "make check" merely stops at the first error but resulting return code would still be zero, wouldn't it?
$ cat Makefile check1: for i in 1 2 3 4; do echo testing $$i; test $$i -le 2 || break; done
check2: for i in 1 2 3 4; do echo testing $$i; test $$i -le 2 || exit; done $ make check1 for i in 1 2 3 4; do echo testing $i; test $i -le 2 || break; done testing 1 testing 2 testing 3 $ make check2 for i in 1 2 3 4; do echo testing $i; test $i -le 2 || exit; done testing 1 testing 2 testing 3 make: *** [check2] Error 1 $ exit