Add makefile rules to run compile-fail tests on .rc files

There's even more duplication now, but I'm reluctant to touch it since it's
easy to subtly break the build rules
This commit is contained in:
Brian Anderson 2011-06-16 17:17:16 -07:00
parent 4b8fba5f34
commit fc12577fdd
1 changed files with 24 additions and 0 deletions

View File

@ -264,3 +264,27 @@ test/compile-fail/%.stage2.out.tmp: test/compile-fail/%.rs $(SREQ2)
$(STAGE2) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
$(Q)grep --text --quiet \
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
test/compile-fail/%.stage0.out.tmp: test/compile-fail/%.rc $(SREQ0)
@$(call E, compile-fail [stage0]: $@)
$(Q)grep -q error-pattern $<
$(Q)rm -f $@
$(STAGE0) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
$(Q)grep --text --quiet \
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
test/compile-fail/%.stage1.out.tmp: test/compile-fail/%.rc $(SREQ1)
@$(call E, compile-fail [stage1]: $@)
$(Q)grep -q error-pattern $<
$(Q)rm -f $@
$(STAGE1) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
$(Q)grep --text --quiet \
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
test/compile-fail/%.stage2.out.tmp: test/compile-fail/%.rc $(SREQ2)
@$(call E, compile-fail [stage2]: $@)
$(Q)grep -q error-pattern $<
$(Q)rm -f $@
$(STAGE2) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
$(Q)grep --text --quiet \
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@