2011-05-01 22:18:52 +02:00
|
|
|
######################################################################
|
|
|
|
# Testing variables
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
ALL_TEST_INPUTS = $(wildcard $(S)src/test/*/*.rs \
|
|
|
|
$(S)src/test/*/*/*.rs \
|
|
|
|
$(S)src/test/*/*.rc)
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
ifneq ($(findstring check,$(MAKECMDGOALS)),)
|
|
|
|
XFAIL_INPUTS := $(shell grep -l xfail $(ALL_TEST_INPUTS))
|
|
|
|
TEST_XFAILS_STAGE0 := $(shell grep -l xfail-stage0 $(XFAIL_INPUTS))
|
|
|
|
TEST_XFAILS_STAGE1 := $(shell grep -l xfail-stage1 $(XFAIL_INPUTS))
|
|
|
|
TEST_XFAILS_STAGE2 := $(shell grep -l xfail-stage2 $(XFAIL_INPUTS))
|
2011-05-01 22:18:52 +02:00
|
|
|
|
|
|
|
ifdef MINGW_CROSS
|
|
|
|
TEST_XFAILS_STAGE0 += $(S)src/test/run-pass/native-mod.rc
|
|
|
|
TEST_XFAILS_STAGE1 += $(S)src/test/run-pass/native-mod.rc
|
|
|
|
TEST_XFAILS_STAGE2 += $(S)src/test/run-pass/native-mod.rc
|
|
|
|
endif
|
|
|
|
ifdef CFG_WINDOWSY
|
|
|
|
TEST_XFAILS_STAGE0 += $(S)src/test/run-pass/native-mod.rc
|
|
|
|
TEST_XFAILS_STAGE1 += $(S)src/test/run-pass/native-mod.rc
|
|
|
|
TEST_XFAILS_STAGE2 += $(S)src/test/run-pass/native-mod.rc
|
|
|
|
endif
|
2011-06-25 21:23:27 +02:00
|
|
|
endif
|
|
|
|
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
BENCH_RS := $(wildcard $(S)src/test/bench/shootout/*.rs) \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(wildcard $(S)src/test/bench/99-bottles/*.rs)
|
2011-06-25 21:23:27 +02:00
|
|
|
RPASS_RC := $(wildcard $(S)src/test/run-pass/*.rc)
|
|
|
|
RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs) $(BENCH_RS)
|
|
|
|
RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
|
|
|
|
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
|
|
|
|
CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
|
|
|
|
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
|
2011-05-01 22:18:52 +02:00
|
|
|
|
|
|
|
ifdef CHECK_XFAILS
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_CRATES_STAGE0 := $(filter $(TEST_XFAILS_STAGE0), $(RPASS_RC))
|
|
|
|
TEST_RPASS_CRATES_STAGE1 := $(filter $(TEST_XFAILS_STAGE1), $(RPASS_RC))
|
|
|
|
TEST_RPASS_CRATES_STAGE2 := $(filter $(TEST_XFAILS_STAGE2), $(RPASS_RC))
|
|
|
|
TEST_RPASS_SOURCES_STAGE0 := $(filter $(TEST_XFAILS_STAGE0), $(RPASS_RS))
|
|
|
|
TEST_RPASS_SOURCES_STAGE1 := $(filter $(TEST_XFAILS_STAGE1), $(RPASS_RS))
|
|
|
|
TEST_RPASS_SOURCES_STAGE2 := $(filter $(TEST_XFAILS_STAGE2), $(RPASS_RS))
|
2011-05-01 22:18:52 +02:00
|
|
|
else
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_CRATES_STAGE0 := $(filter-out $(TEST_XFAILS_STAGE0), $(RPASS_RC))
|
|
|
|
TEST_RPASS_CRATES_STAGE1 := $(filter-out $(TEST_XFAILS_STAGE1), $(RPASS_RC))
|
|
|
|
TEST_RPASS_CRATES_STAGE1 := $(filter-out $(TEST_XFAILS_STAGE2), $(RPASS_RC))
|
|
|
|
TEST_RPASS_SOURCES_STAGE0 := $(filter-out $(TEST_XFAILS_STAGE0), $(RPASS_RS))
|
|
|
|
TEST_RPASS_SOURCES_STAGE1 := $(filter-out $(TEST_XFAILS_STAGE1), $(RPASS_RS))
|
|
|
|
TEST_RPASS_SOURCES_STAGE2 := $(filter-out $(TEST_XFAILS_STAGE2), $(RPASS_RS))
|
2011-05-01 22:18:52 +02:00
|
|
|
endif
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_EXES_STAGE0 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_RPASS_CRATES_STAGE0:.rc=.stage0$(X))) \
|
|
|
|
$(subst $(S)src/,,$(TEST_RPASS_SOURCES_STAGE0:.rs=.stage0$(X)))
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_EXES_STAGE1 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_RPASS_CRATES_STAGE1:.rc=.stage1$(X))) \
|
|
|
|
$(subst $(S)src/,,$(TEST_RPASS_SOURCES_STAGE1:.rs=.stage1$(X)))
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_EXES_STAGE2 := \
|
2011-06-29 02:36:51 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_RPASS_CRATES_STAGE2:.rc=.stage2$(X))) \
|
|
|
|
$(subst $(S)src/,,$(TEST_RPASS_SOURCES_STAGE2:.rs=.stage2$(X)))
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_OUTS_STAGE0 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE0:.stage0$(X)=.stage0.out)
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_OUTS_STAGE1 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE1:.stage1$(X)=.stage1.out)
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_OUTS_STAGE2 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE2:.stage2$(X)=.stage2.out)
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_TMPS_STAGE0 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE0:.stage0$(X)=.stage0$(X).tmp)
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_TMPS_STAGE1 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE1:.stage1$(X)=.stage1$(X).tmp)
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RPASS_TMPS_STAGE2 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE2:.stage2$(X)=.stage2$(X).tmp)
|
|
|
|
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RFAIL_CRATES_STAGE0 := $(filter-out $(TEST_XFAILS_STAGE0), $(RFAIL_RC))
|
|
|
|
TEST_RFAIL_CRATES_STAGE1 := $(filter-out $(TEST_XFAILS_STAGE1), $(RFAIL_RC))
|
|
|
|
TEST_RFAIL_CRATES_STAGE2 := $(filter-out $(TEST_XFAILS_STAGE2), $(RFAIL_RC))
|
|
|
|
TEST_RFAIL_SOURCES_STAGE0 := $(filter-out $(TEST_XFAILS_STAGE0), $(RFAIL_RS))
|
|
|
|
TEST_RFAIL_SOURCES_STAGE1 := $(filter-out $(TEST_XFAILS_STAGE1), $(RFAIL_RS))
|
|
|
|
TEST_RFAIL_SOURCES_STAGE2 := $(filter-out $(TEST_XFAILS_STAGE2), $(RFAIL_RS))
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RFAIL_EXES_STAGE0 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_RFAIL_CRATES_STAGE0:.rc=.stage0$(X))) \
|
|
|
|
$(subst $(S)src/,,$(TEST_RFAIL_SOURCES_STAGE0:.rs=.stage0$(X)))
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RFAIL_EXES_STAGE1 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_RFAIL_CRATES_STAGE1:.rc=.stage1$(X))) \
|
|
|
|
$(subst $(S)src/,,$(TEST_RFAIL_SOURCES_STAGE1:.rs=.stage1$(X)))
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RFAIL_EXES_STAGE2 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_RFAIL_CRATES_STAGE2:.rc=.stage2$(X))) \
|
|
|
|
$(subst $(S)src/,,$(TEST_RFAIL_SOURCES_STAGE2:.rs=.stage2$(X)))
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RFAIL_OUTS_STAGE0 := \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RFAIL_EXES_STAGE0:.stage0$(X)=.stage0.out)
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RFAIL_OUTS_STAGE1 := \
|
2011-05-25 04:09:12 +02:00
|
|
|
$(TEST_RFAIL_EXES_STAGE1:.stage1$(X)=.stage1.out)
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_RFAIL_OUTS_STAGE2 := \
|
2011-05-25 04:09:12 +02:00
|
|
|
$(TEST_RFAIL_EXES_STAGE2:.stage2$(X)=.stage2.out)
|
2011-05-01 22:18:52 +02:00
|
|
|
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_CFAIL_CRATES_STAGE0 := $(filter-out $(TEST_XFAILS_STAGE0), $(CFAIL_RC))
|
|
|
|
TEST_CFAIL_CRATES_STAGE1 := $(filter-out $(TEST_XFAILS_STAGE1), $(CFAIL_RC))
|
|
|
|
TEST_CFAIL_CRATES_STAGE2 := $(filter-out $(TEST_XFAILS_STAGE2), $(CFAIL_RC))
|
|
|
|
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))
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_CFAIL_OUTS_STAGE0 := \
|
2011-05-04 20:21:14 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE0:.rc=.stage0.out)) \
|
|
|
|
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE0:.rs=.stage0.out))
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_CFAIL_OUTS_STAGE1 := \
|
2011-05-04 20:21:14 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE1:.rc=.stage1.out)) \
|
|
|
|
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE1:.rs=.stage1.out))
|
2011-06-25 21:23:27 +02:00
|
|
|
TEST_CFAIL_OUTS_STAGE2 := \
|
2011-05-04 20:21:14 +02:00
|
|
|
$(subst $(S)src/,,$(TEST_CFAIL_CRATES_STAGE2:.rc=.stage2.out)) \
|
|
|
|
$(subst $(S)src/,,$(TEST_CFAIL_SOURCES_STAGE2:.rs=.stage2.out))
|
2011-05-01 22:18:52 +02:00
|
|
|
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
ALL_TEST_CRATES := $(TEST_CFAIL_CRATES_STAGE0) \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RFAIL_CRATES_STAGE0) \
|
|
|
|
$(TEST_RPASS_CRATES_STAGE0) \
|
|
|
|
$(TEST_CFAIL_CRATES_STAGE1) \
|
|
|
|
$(TEST_RFAIL_CRATES_STAGE1) \
|
|
|
|
$(TEST_RPASS_CRATES_STAGE1) \
|
|
|
|
$(TEST_CFAIL_CRATES_STAGE2) \
|
|
|
|
$(TEST_RFAIL_CRATES_STAGE2) \
|
|
|
|
$(TEST_RPASS_CRATES_STAGE2)
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
ALL_TEST_SOURCES := $(TEST_CFAIL_SOURCES_STAGE0) \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RFAIL_SOURCES_STAGE0) \
|
|
|
|
$(TEST_RPASS_SOURCES_STAGE0) \
|
|
|
|
$(TEST_CFAIL_SOURCES_STAGE1) \
|
|
|
|
$(TEST_RFAIL_SOURCES_STAGE1) \
|
|
|
|
$(TEST_RPASS_SOURCES_STAGE1) \
|
|
|
|
$(TEST_CFAIL_SOURCES_STAGE2) \
|
|
|
|
$(TEST_RFAIL_SOURCES_STAGE2) \
|
|
|
|
$(TEST_RPASS_SOURCES_STAGE2)
|
|
|
|
|
2011-06-30 00:12:02 +02:00
|
|
|
|
|
|
|
FT := run_pass_stage2
|
|
|
|
FT_LIB := $(call CFG_LIB_NAME,$(FT))
|
|
|
|
FT_DRIVER := $(FT)_driver
|
|
|
|
GENERATED += test/$(FT).rc test/$(FT_DRIVER).rs
|
|
|
|
|
|
|
|
|
2011-05-05 02:32:05 +02:00
|
|
|
check-nocompile: $(TEST_CFAIL_OUTS_STAGE0) \
|
2011-05-04 00:51:21 +02:00
|
|
|
$(TEST_CFAIL_OUTS_STAGE1) \
|
|
|
|
$(TEST_CFAIL_OUTS_STAGE2)
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-05-05 02:32:05 +02:00
|
|
|
check-stage0: tidy \
|
|
|
|
$(TEST_RPASS_EXES_STAGE0) $(TEST_RFAIL_EXES_STAGE0) \
|
|
|
|
$(TEST_RPASS_OUTS_STAGE0) $(TEST_RFAIL_OUTS_STAGE0) \
|
|
|
|
$(TEST_CFAIL_OUTS_STAGE0) \
|
|
|
|
|
|
|
|
|
|
|
|
check-stage1: tidy \
|
|
|
|
$(TEST_RPASS_EXES_STAGE1) $(TEST_RFAIL_EXES_STAGE1) \
|
|
|
|
$(TEST_RPASS_OUTS_STAGE1) $(TEST_RFAIL_OUTS_STAGE1) \
|
|
|
|
$(TEST_CFAIL_OUTS_STAGE1) \
|
|
|
|
|
|
|
|
|
|
|
|
check-stage2: tidy \
|
|
|
|
$(TEST_RPASS_EXES_STAGE2) $(TEST_RFAIL_EXES_STAGE2) \
|
|
|
|
$(TEST_RPASS_OUTS_STAGE2) $(TEST_RFAIL_OUTS_STAGE2) \
|
|
|
|
$(TEST_CFAIL_OUTS_STAGE2) \
|
|
|
|
|
2011-05-04 20:21:14 +02:00
|
|
|
|
2011-05-01 22:18:52 +02:00
|
|
|
check: tidy \
|
2011-05-11 18:37:23 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE2) $(TEST_RFAIL_EXES_STAGE2) \
|
|
|
|
$(TEST_RPASS_OUTS_STAGE2) $(TEST_RFAIL_OUTS_STAGE2) \
|
|
|
|
$(TEST_CFAIL_OUTS_STAGE2)
|
|
|
|
|
2011-06-30 00:12:02 +02:00
|
|
|
fast-check: tidy \
|
|
|
|
test/$(FT_DRIVER).out
|
|
|
|
|
2011-05-11 18:37:23 +02:00
|
|
|
full-check: tidy \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(TEST_RPASS_EXES_STAGE0) $(TEST_RFAIL_EXES_STAGE0) \
|
|
|
|
$(TEST_RPASS_OUTS_STAGE0) $(TEST_RFAIL_OUTS_STAGE0) \
|
2011-05-04 00:51:21 +02:00
|
|
|
$(TEST_CFAIL_OUTS_STAGE0) \
|
|
|
|
$(TEST_RPASS_EXES_STAGE1) $(TEST_RFAIL_EXES_STAGE1) \
|
|
|
|
$(TEST_RPASS_OUTS_STAGE1) $(TEST_RFAIL_OUTS_STAGE1) \
|
|
|
|
$(TEST_CFAIL_OUTS_STAGE1) \
|
|
|
|
$(TEST_RPASS_EXES_STAGE2) $(TEST_RFAIL_EXES_STAGE2) \
|
|
|
|
$(TEST_RPASS_OUTS_STAGE2) $(TEST_RFAIL_OUTS_STAGE2) \
|
|
|
|
$(TEST_CFAIL_OUTS_STAGE2)
|
2011-05-01 22:18:52 +02:00
|
|
|
|
|
|
|
compile-check: tidy \
|
|
|
|
$(TEST_RPASS_EXES_STAGE0) $(TEST_RFAIL_EXES_STAGE0) \
|
|
|
|
$(TEST_RPASS_EXES_STAGE1) $(TEST_RFAIL_EXES_STAGE1) \
|
|
|
|
$(TEST_RPASS_EXES_STAGE2) $(TEST_RFAIL_EXES_STAGE2)
|
|
|
|
|
|
|
|
|
2011-06-30 00:12:02 +02:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Fast-test rules
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
test/$(FT).rc test/$(FT_DRIVER).rs: $(TEST_RPASS_SOURCES_STAGE2) \
|
|
|
|
$(S)src/etc/combine-tests.py
|
|
|
|
@$(call E, check: building combined stage2 test runner)
|
|
|
|
$(Q)$(S)src/etc/combine-tests.py
|
|
|
|
|
|
|
|
stage2/lib/$(FT_LIB): test/$(FT).rc $(SREQ2)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE2) --shared -o $@ $<
|
|
|
|
|
|
|
|
test/$(FT_DRIVER): test/$(FT_DRIVER).rs stage2/lib/$(FT_LIB) $(SREQ2)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE2) -o $@ $<
|
|
|
|
|
|
|
|
test/$(FT_DRIVER).out: test/$(FT_DRIVER) $(SREQ2)
|
|
|
|
$(Q)$(call CFG_RUN_TEST, $<) | tee $@
|
|
|
|
|
|
|
|
|
2011-05-01 22:18:52 +02:00
|
|
|
######################################################################
|
|
|
|
# Testing rules
|
|
|
|
######################################################################
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
tidy:
|
|
|
|
@$(call E, check: formatting)
|
|
|
|
$(Q)echo \
|
|
|
|
$(filter-out $(GENERATED) $(addprefix $(S)src/, $(GENERATED)) \
|
|
|
|
$(addprefix $(S)src/, $(RUSTLLVM_LIB_CS) $(RUSTLLVM_OBJS_CS) \
|
|
|
|
$(RUSTLLVM_HDR) $(PKG_3RDPARTY)) \
|
|
|
|
$(S)src/etc/%, $(PKG_FILES)) \
|
|
|
|
| xargs -n 10 python $(S)src/etc/tidy.py
|
|
|
|
|
2011-06-16 21:06:09 +02:00
|
|
|
%.stage0$(X): %.rs $(SREQ0)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE0) -o $@ $<
|
|
|
|
|
|
|
|
%.stage0$(X): %.rc $(SREQ0)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE0) -o $@ $<
|
|
|
|
|
|
|
|
%.stage1$(X): %.rs $(SREQ1)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE1) -o $@ $<
|
|
|
|
|
|
|
|
%.stage1$(X): %.rc $(SREQ1)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE1) -o $@ $<
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-06-14 23:51:31 +02:00
|
|
|
%.stage2$(X): %.rs $(SREQ2)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE2) -o $@ $<
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-06-14 23:51:31 +02:00
|
|
|
%.stage2$(X): %.rc $(SREQ2)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE2) -o $@ $<
|
2011-05-01 22:18:52 +02:00
|
|
|
|
|
|
|
# Cancel the implicit .out rule in GNU make.
|
|
|
|
%.out: %
|
|
|
|
|
|
|
|
%.out: %.out.tmp
|
|
|
|
$(Q)mv $< $@
|
|
|
|
|
|
|
|
test/run-pass/%.out.tmp: test/run-pass/%$(X) rt/$(CFG_RUNTIME)
|
|
|
|
$(Q)rm -f $<.tmp
|
|
|
|
@$(call E, run: $@)
|
|
|
|
$(Q)$(call CFG_RUN_TEST, $<) > $@
|
|
|
|
|
|
|
|
test/bench/shootout/%.out.tmp: test/bench/shootout/%$(X) \
|
|
|
|
rt/$(CFG_RUNTIME)
|
|
|
|
$(Q)rm -f $<.tmp
|
|
|
|
@$(call E, run: $@)
|
|
|
|
$(Q)$(call CFG_RUN_TEST, $<) > $@
|
|
|
|
|
|
|
|
test/bench/99-bottles/%.out.tmp: test/bench/99-bottles/%$(X) \
|
|
|
|
rt/$(CFG_RUNTIME)
|
|
|
|
$(Q)rm -f $<.tmp
|
|
|
|
@$(call E, run: $@)
|
|
|
|
$(Q)$(call CFG_RUN_TEST, $<) > $@
|
|
|
|
|
|
|
|
test/run-fail/%.out.tmp: test/run-fail/%$(X) \
|
|
|
|
rt/$(CFG_RUNTIME)
|
|
|
|
$(Q)rm -f $<.tmp
|
2011-05-04 20:21:14 +02:00
|
|
|
@$(call E, run-fail: $@)
|
2011-05-01 22:18:52 +02:00
|
|
|
$(Q)grep -q error-pattern $(S)src/test/run-fail/$(basename $*).rs
|
|
|
|
$(Q)rm -f $@
|
|
|
|
$(Q)$(call CFG_RUN_TEST, $<) >$@ 2>&1 ; X=$$? ; \
|
|
|
|
if [ $$X -eq 0 ] ; then exit 1 ; else exit 0 ; fi
|
|
|
|
$(Q)grep --text --quiet \
|
|
|
|
"$$(grep error-pattern $(S)src/test/run-fail/$(basename $*).rs \
|
|
|
|
| cut -d : -f 2- | tr -d '\n\r')" $@
|
|
|
|
|
2011-05-04 00:51:21 +02:00
|
|
|
test/compile-fail/%.stage0.out.tmp: test/compile-fail/%.rs $(SREQ0)
|
2011-05-04 20:21:14 +02:00
|
|
|
@$(call E, compile-fail [stage0]: $@)
|
2011-05-01 22:18:52 +02:00
|
|
|
$(Q)grep -q error-pattern $<
|
|
|
|
$(Q)rm -f $@
|
2011-05-04 20:21:14 +02:00
|
|
|
$(STAGE0) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
|
2011-05-01 22:18:52 +02:00
|
|
|
$(Q)grep --text --quiet \
|
|
|
|
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
|
|
|
|
|
2011-05-04 00:51:21 +02:00
|
|
|
test/compile-fail/%.stage1.out.tmp: test/compile-fail/%.rs $(SREQ1)
|
2011-05-04 20:21:14 +02:00
|
|
|
@$(call E, compile-fail [stage1]: $@)
|
2011-05-01 22:18:52 +02:00
|
|
|
$(Q)grep -q error-pattern $<
|
|
|
|
$(Q)rm -f $@
|
2011-05-04 20:21:14 +02:00
|
|
|
$(STAGE1) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
|
2011-05-04 00:51:21 +02:00
|
|
|
$(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)
|
2011-05-04 20:21:14 +02:00
|
|
|
@$(call E, compile-fail [stage2]: $@)
|
2011-05-04 00:51:21 +02:00
|
|
|
$(Q)grep -q error-pattern $<
|
|
|
|
$(Q)rm -f $@
|
2011-05-04 20:21:14 +02:00
|
|
|
$(STAGE2) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
|
2011-05-01 22:18:52 +02:00
|
|
|
$(Q)grep --text --quiet \
|
|
|
|
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
|
2011-06-17 02:17:16 +02:00
|
|
|
|
|
|
|
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')" $@
|