mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-21 20:23:21 +00:00
Fix horrible rule-hijacking bug that was causing compile-fail targets to trigger honest compile attempts.
This commit is contained in:
parent
456398a403
commit
48021ef1f6
47
mk/tests.mk
47
mk/tests.mk
@ -95,12 +95,6 @@ TEST_RFAIL_OUTS_STAGE1 = \
|
||||
TEST_RFAIL_OUTS_STAGE2 = \
|
||||
$(TEST_RFAIL_EXES_STAGE0:.stage2$(X)=.stage2.out)
|
||||
|
||||
TEST_RFAIL_TMPS_STAGE0 = \
|
||||
$(TEST_RFAIL_EXES_STAGE0:.stage0$(X)=.stage0$(X).tmp)
|
||||
TEST_RFAIL_TMPS_STAGE1 = \
|
||||
$(TEST_RFAIL_EXES_STAGE1:.stage1$(X)=.stage1$(X).tmp)
|
||||
TEST_RFAIL_TMPS_STAGE2 = \
|
||||
$(TEST_RFAIL_EXES_STAGE2:.stage2$(X)=.stage2$(X).tmp)
|
||||
|
||||
TEST_CFAIL_CRATES_STAGE0 = $(filter-out $(TEST_XFAILS_STAGE0), $(CFAIL_RC))
|
||||
TEST_CFAIL_CRATES_STAGE1 = $(filter-out $(TEST_XFAILS_STAGE1), $(CFAIL_RC))
|
||||
@ -109,29 +103,15 @@ TEST_CFAIL_SOURCES_STAGE0 = $(filter-out $(TEST_XFAILS_STAGE0), $(CFAIL_RS))
|
||||
TEST_CFAIL_SOURCES_STAGE1 = $(filter-out $(TEST_XFAILS_STAGE1), $(CFAIL_RS))
|
||||
TEST_CFAIL_SOURCES_STAGE2 = $(filter-out $(TEST_XFAILS_STAGE2), $(CFAIL_RS))
|
||||
|
||||
TEST_CFAIL_EXES_STAGE0 = \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE0:.rc=.stage0$(X))) \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE0:.rs=.stage0$(X)))
|
||||
TEST_CFAIL_EXES_STAGE1 = \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE1:.rc=.stage1$(X))) \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE1:.rs=.stage1$(X)))
|
||||
TEST_CFAIL_EXES_STAGE2 = \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE2:.rc=.stage2$(X))) \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE2:.rs=.stage2$(X)))
|
||||
|
||||
TEST_CFAIL_OUTS_STAGE0 = \
|
||||
$(TEST_CFAIL_EXES_STAGE0:.stage0$(X)=.stage0.out)
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE0:.rc=.stage0.out)) \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE0:.rs=.stage0.out))
|
||||
TEST_CFAIL_OUTS_STAGE1 = \
|
||||
$(TEST_CFAIL_EXES_STAGE1:.stage1$(X)=.stage1.out)
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE1:.rc=.stage1.out)) \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE1:.rs=.stage1.out))
|
||||
TEST_CFAIL_OUTS_STAGE2 = \
|
||||
$(TEST_CFAIL_EXES_STAGE0:.stage2$(X)=.stage2.out)
|
||||
|
||||
TEST_CFAIL_TMPS_STAGE0 = \
|
||||
$(TEST_CFAIL_EXES_STAGE0:.stage0$(X)=.stage0$(X).tmp)
|
||||
TEST_CFAIL_TMPS_STAGE1 = \
|
||||
$(TEST_CFAIL_EXES_STAGE1:.stage1$(X)=.stage1$(X).tmp)
|
||||
TEST_CFAIL_TMPS_STAGE0 = \
|
||||
$(TEST_CFAIL_EXES_STAGE2:.stage2$(X)=.stage2$(X).tmp)
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE2:.rc=.stage2.out)) \
|
||||
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE2:.rs=.stage2.out))
|
||||
|
||||
|
||||
ALL_TEST_CRATES = $(TEST_CFAIL_CRATES_STAGE0) \
|
||||
@ -163,6 +143,7 @@ check_nocompile: $(TEST_CFAIL_OUTS_STAGE0) \
|
||||
$(TEST_CFAIL_OUTS_STAGE1) \
|
||||
$(TEST_CFAIL_OUTS_STAGE2)
|
||||
|
||||
|
||||
check: tidy \
|
||||
$(TEST_RPASS_EXES_STAGE0) $(TEST_RFAIL_EXES_STAGE0) \
|
||||
$(TEST_RPASS_OUTS_STAGE0) $(TEST_RFAIL_OUTS_STAGE0) \
|
||||
@ -265,7 +246,7 @@ test/bench/99-bottles/%.out.tmp: test/bench/99-bottles/%$(X) \
|
||||
test/run-fail/%.out.tmp: test/run-fail/%$(X) \
|
||||
rt/$(CFG_RUNTIME)
|
||||
$(Q)rm -f $<.tmp
|
||||
@$(call E, run: $@)
|
||||
@$(call E, run-fail: $@)
|
||||
$(Q)grep -q error-pattern $(S)src/test/run-fail/$(basename $*).rs
|
||||
$(Q)rm -f $@
|
||||
$(Q)$(call CFG_RUN_TEST, $<) >$@ 2>&1 ; X=$$? ; \
|
||||
@ -275,25 +256,25 @@ test/run-fail/%.out.tmp: test/run-fail/%$(X) \
|
||||
| cut -d : -f 2- | tr -d '\n\r')" $@
|
||||
|
||||
test/compile-fail/%.stage0.out.tmp: test/compile-fail/%.rs $(SREQ0)
|
||||
@$(call E, compile [stage0]: $@)
|
||||
@$(call E, compile-fail [stage0]: $@)
|
||||
$(Q)grep -q error-pattern $<
|
||||
$(Q)rm -f $@
|
||||
$(STAGE0) -o $(@:.out=$(X)) $< >$@ 2>&1; test $$? -ne 0
|
||||
$(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/%.rs $(SREQ1)
|
||||
@$(call E, compile [stage1]: $@)
|
||||
@$(call E, compile-fail [stage1]: $@)
|
||||
$(Q)grep -q error-pattern $<
|
||||
$(Q)rm -f $@
|
||||
$(STAGE1) -o $(@:.out=$(X)) $< >$@ 2>&1; test $$? -ne 0
|
||||
$(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/%.rs $(SREQ2)
|
||||
@$(call E, compile [stage2]: $@)
|
||||
@$(call E, compile-fail [stage2]: $@)
|
||||
$(Q)grep -q error-pattern $<
|
||||
$(Q)rm -f $@
|
||||
$(STAGE2) -o $(@:.out=$(X)) $< >$@ 2>&1; test $$? -ne 0
|
||||
$(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')" $@
|
||||
|
Loading…
Reference in New Issue
Block a user