* [PATCH] Do not ignore errors during make check
@ 2005-12-14 21:09 Amos Waterland
2005-12-14 21:30 ` Junio C Hamano
2005-12-14 23:38 ` Linus Torvalds
0 siblings, 2 replies; 4+ messages in thread
From: Amos Waterland @ 2005-12-14 21:09 UTC (permalink / raw)
To: junkio; +Cc: git
Do not let errors pass by unnoticed when running `make check'.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
20898ba8a3c6f78bb136626fddc34221df427116
diff --git a/Makefile b/Makefile
index 01b6643..3f62bcb 100644
--- a/Makefile
+++ b/Makefile
@@ -449,7 +449,7 @@ test-delta$X: test-delta.c diff-delta.o
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^
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
--
0.99.9.GIT
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Do not ignore errors during make check
2005-12-14 21:09 [PATCH] Do not ignore errors during make check Amos Waterland
@ 2005-12-14 21:30 ` Junio C Hamano
2005-12-14 21:44 ` Amos Waterland
2005-12-14 23:38 ` Linus Torvalds
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2005-12-14 21:30 UTC (permalink / raw)
To: Amos Waterland; +Cc: git
Amos Waterland <apw@us.ibm.com> writes:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Do not ignore errors during make check
2005-12-14 21:30 ` Junio C Hamano
@ 2005-12-14 21:44 ` Amos Waterland
0 siblings, 0 replies; 4+ messages in thread
From: Amos Waterland @ 2005-12-14 21:44 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Wed, Dec 14, 2005 at 01:30:16PM -0800, Junio C Hamano wrote:
> 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?
Yes, here is a patch that uses exit instead of break.
---
Do not let errors pass by unnoticed when running `make check'.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
bc721e2d99487c0240514a848ac1cb84c086e008
diff --git a/Makefile b/Makefile
index 01b6643..d494ad4 100644
--- a/Makefile
+++ b/Makefile
@@ -449,7 +449,7 @@ test-delta$X: test-delta.c diff-delta.o
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^
check:
- for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done
+ for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
--
0.99.9.GIT
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Do not ignore errors during make check
2005-12-14 21:09 [PATCH] Do not ignore errors during make check Amos Waterland
2005-12-14 21:30 ` Junio C Hamano
@ 2005-12-14 23:38 ` Linus Torvalds
1 sibling, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2005-12-14 23:38 UTC (permalink / raw)
To: Amos Waterland; +Cc: junkio, git
On Wed, 14 Dec 2005, Amos Waterland wrote:
>
> 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
Actually, you might be better off with just
sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) *.c
these days. It will cause some interesting warnings (it actually
cross-checks things, and is unhappy about multiple "main()" declarations
with different types ;), but especially with eventual libification it
might even be a good idea to try to avoid global functions with the same
names in different programs ("main", of course, is special, sparse is
just too stupid to know).
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-14 23:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-14 21:09 [PATCH] Do not ignore errors during make check Amos Waterland
2005-12-14 21:30 ` Junio C Hamano
2005-12-14 21:44 ` Amos Waterland
2005-12-14 23:38 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).