Add build targets for running stdtest. Issue #428

This commit is contained in:
Brian Anderson 2011-07-12 13:04:29 -07:00
parent f06fdd5ca1
commit 9a37308101

View File

@ -138,7 +138,6 @@ ALL_TEST_SOURCES := $(TEST_CFAIL_SOURCES_STAGE0) \
$(TEST_RFAIL_SOURCES_STAGE2) \
$(TEST_RPASS_SOURCES_STAGE2)
FT := run_pass_stage2
FT_LIB := $(call CFG_LIB_NAME,$(FT))
FT_DRIVER := $(FT)_driver
@ -338,9 +337,31 @@ test/compile-fail/%.stage2.out.tmp: test/compile-fail/%.rc $(SREQ2)
$(Q)grep --text --quiet \
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
# Testing the stdtest crate
STDTEST_CRATE := $(S)src/test/stdtest/stdtest.rc
STDTEST_INPUTS := $(wildcard $(S)src/test/stdtest/*rs)
test/stdtest/stdtest.stage1$(X): $(STDTEST_CRATE) $(STDTEST_INPUTS) $(SREQ1)
@$(call E, compile_and_link: $@)
$(STAGE1) -o $@ $< --test
test/stdtest/stdtest.stage2$(X): $(STDTEST_CRATE) $(STDTEST_INPUTS) $(SREQ2)
@$(call E, compile_and_link: $@)
$(STAGE2) -o $@ $< --test
test/stdtest/stdtest.stage3$(X): $(STDTEST_CRATE) $(STDTEST_INPUTS) $(SREQ3)
@$(call E, compile_and_link: $@)
$(STAGE3) -o $@ $< --test
check-stage1-std:test/stdtest/stdtest.stage1$(X)
@$(call E, run: $<)
$(Q)$(call CFG_RUN_TARG,stage1,stage1, $<)
check-stage2-std:test/stdtest/stdtest.stage2$(X)
@$(call E, run: $<)
$(Q)$(call CFG_RUN_TARG,stage2,stage2, $<)
check-stage3-std:test/stdtest/stdtest.stage3$(X)
@$(call E, run: $<)
$(Q)$(call CFG_RUN_TARG,stage3,stage3, $<)