From 9b9ceea6bdcc51ffab258ed2d6ef23066c17838c Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 2 Jun 2012 21:30:26 -0700 Subject: [PATCH] Begin running cargo tests --- mk/tests.mk | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/mk/tests.mk b/mk/tests.mk index 626b3a0b48d..89646a90a4c 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -205,6 +205,7 @@ check-stage$(1)-T-$(2)-H-$(3): tidy \ check-stage$(1)-T-$(2)-H-$(3)-bench \ check-stage$(1)-T-$(2)-H-$(3)-pretty \ check-stage$(1)-T-$(2)-H-$(3)-rustdoc \ + check-stage$(1)-T-$(2)-H-$(3)-cargo \ check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial \ check-stage$(1)-T-$(2)-H-$(3)-doc-ref @@ -260,6 +261,9 @@ check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty: \ check-stage$(1)-T-$(2)-H-$(3)-rustdoc: \ check-stage$(1)-T-$(2)-H-$(3)-rustdoc-dummy +check-stage$(1)-T-$(2)-H-$(3)-cargo: \ + check-stage$(1)-T-$(2)-H-$(3)-cargo-dummy + check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial: \ check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-dummy @@ -327,6 +331,23 @@ check-stage$(1)-T-$(2)-H-$(3)-rustdoc-dummy: \ $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \ --logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rustdoc.log +# Rules for the cargo test runner + +$(3)/test/cargotest.stage$(1)-$(2)$$(X): \ + $$(CARGO_CRATE) $$(CARGO_INPUTS) \ + $$(TSREQ$(1)_T_$(2)_H_$(3)) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) + @$$(call E, compile_and_link: $$@) + $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test + +check-stage$(1)-T-$(2)-H-$(3)-cargo-dummy: \ + $(3)/test/cargotest.stage$(1)-$(2)$$(X) + @$$(call E, run: $$<) + $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \ + --logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-cargo.log + # Rules for the cfail/rfail/rpass/bench/perf test runner CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \ @@ -639,6 +660,9 @@ check-stage$(1)-H-$(2)-pretty-pretty: \ check-stage$(1)-H-$(2)-rustdoc: \ $$(foreach target,$$(CFG_TARGET_TRIPLES), \ check-stage$(1)-T-$$(target)-H-$(2)-rustdoc) +check-stage$(1)-H-$(2)-cargo: \ + $$(foreach target,$$(CFG_TARGET_TRIPLES), \ + check-stage$(1)-T-$$(target)-H-$(2)-cargo) check-stage$(1)-H-$(2)-doc-tutorial: \ $$(foreach target,$$(CFG_TARGET_TRIPLES), \ check-stage$(1)-T-$$(target)-H-$(2)-doc-tutorial) @@ -714,6 +738,9 @@ check-stage$(1)-H-all-pretty-pretty: \ check-stage$(1)-H-all-rustdoc: \ $$(foreach target,$$(CFG_TARGET_TRIPLES), \ check-stage$(1)-H-$$(target)-rustdoc) +check-stage$(1)-H-all-cargo: \ + $$(foreach target,$$(CFG_TARGET_TRIPLES), \ + check-stage$(1)-H-$$(target)-cargo) check-stage$(1)-H-all-doc-tutorial: \ $$(foreach target,$$(CFG_TARGET_TRIPLES), \ check-stage$(1)-H-$$(target)-doc-tutorial) @@ -745,6 +772,7 @@ check-stage$(1)-pretty-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rfail check-stage$(1)-pretty-bench: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-bench check-stage$(1)-pretty-pretty: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-pretty check-stage$(1)-rustdoc: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rustdoc +check-stage$(1)-cargo: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-cargo check-stage$(1)-doc-tutorial: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-tutorial check-stage$(1)-doc-ref: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-ref