From e96414a6f045465cc261d6f9ea823e9e60291886 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 10 Jan 2011 14:53:20 -0800 Subject: Further corrections to the Makefile rules covering failing tests. --- src/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 4d290b10..7127e4b1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -642,6 +642,7 @@ test/run-fail/%.out.tmp: test/run-fail/%$(CFG_EXE_SUFFIX) \ $(CFG_RUNTIME) $(CFG_QUIET)rm -f $<.tmp @$(call CFG_ECHO, run: $<) + $(CFG_QUIET)grep -q error-pattern test/run-fail/$(basename $*).rs $(CFG_QUIET)rm -f $@ $(CFG_QUIET)$(call CFG_RUN_TARG, $<) >$@ 2>&1 ; X=$$? ; \ if [ $$X -eq 0 ] ; then exit 1 ; else exit 0 ; fi @@ -652,15 +653,17 @@ test/run-fail/%.out.tmp: test/run-fail/%$(CFG_EXE_SUFFIX) \ test/compile-fail/%.boot.out.tmp: test/compile-fail/%.rs $(BREQ) @$(call CFG_ECHO, compile [boot]: $<) + $(CFG_QUIET)grep -q error-pattern $< $(CFG_QUIET)rm -f $@ - $(BOOT) -o $(@:.out=$(CFG_EXE_SUFFIX)) $< >$@ 2>&1 || true + $(BOOT) -o $(@:.out=$(CFG_EXE_SUFFIX)) $< >$@ 2>&1; test $$? -ne 0 $(CFG_QUIET)grep --text --quiet \ "`awk -F: '/error-pattern/ { print $$2 }' $< | tr -d '\n\r'`" $@ test/compile-fail/%.rustc.out.tmp: test/compile-fail/%.rs $(SREQ) @$(call CFG_ECHO, compile [rustc]: $<) + $(CFG_QUIET)grep -q error-pattern $< $(CFG_QUIET)rm -f $@ - $(RUSTC) -o $(@:.out=$(CFG_EXE_SUFFIX)) $< >$@ 2>&1 || true + $(RUSTC) -o $(@:.out=$(CFG_EXE_SUFFIX)) $< >$@ 2>&1; test $$? -ne 0 $(CFG_QUIET)grep --text --quiet \ "`awk -F: '/error-pattern/ { print $$2 }' $< | tr -d '\n\r'`" $@ -- cgit v1.2.3