From e13390a199810079a2b67891f6bb29b15bcf85c8 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 1 Aug 2011 11:57:05 -0700 Subject: [PATCH] Pretty-print test the rfail tests. Issue #789 --- mk/tests.mk | 33 +++++++++++++++++++----- src/test/run-fail/fmt-fail.rs | 1 + src/test/run-fail/fn-constraint-claim.rs | 1 + 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/mk/tests.mk b/mk/tests.mk index f7eb89d2ca60..8df9c4b69958 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -150,6 +150,10 @@ check-stage$(2)-bench: test/bench.stage$(2).out \ check-stage$(2)-pretty: test/pretty.stage$(2).out \ +check-stage$(2)-pretty-rpass: test/pretty-rpass.stage$(2).out \ + +check-stage$(2)-pretty-rfail: test/pretty-rfail.stage$(2).out \ + CTEST_COMMON_ARGS$(2) := --compile-lib-path stage$(2) \ --run-lib-path stage$(2)/lib \ --rustc-path stage$(2)/rustc$$(X) \ @@ -180,10 +184,15 @@ BENCH_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \ --mode run-pass \ $$(CTEST_RUNTOOL) \ -PRETTY_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \ - --src-base $$(S)src/test/run-pass/ \ - --build-base test/run-pass/ \ - --mode pretty \ +PRETTY_RPASS_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \ + --src-base $$(S)src/test/run-pass/ \ + --build-base test/run-pass/ \ + --mode pretty \ + +PRETTY_RFAIL_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \ + --src-base $$(S)src/test/run-fail/ \ + --build-base test/run-fail/ \ + --mode pretty \ test/compiletest.stage$(2)$$(X): $$(COMPILETEST_CRATE) \ $$(COMPILETEST_INPUTS) \ @@ -215,10 +224,20 @@ test/bench.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \ $$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(BENCH_ARGS$(2)) $$(Q)touch $$@ -test/pretty.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \ - $$(RPASS_TESTS) +test/pretty-rpass.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \ + $$(RPASS_TESTS) @$$(call E, run: $$<) - $$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(PRETTY_ARGS$(2)) + $$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(PRETTY_RPASS_ARGS$(2)) + $$(Q)touch $$@ + +test/pretty-rfail.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \ + $$(RFAIL_TESTS) + @$$(call E, run: $$<) + $$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(PRETTY_RFAIL_ARGS$(2)) + $$(Q)touch $$@ + +test/pretty.stage$(2).out.tmp: test/pretty-rpass.stage$(2).out.tmp \ + test/pretty-rfail.stage$(2).out.tmp $$(Q)touch $$@ endef diff --git a/src/test/run-fail/fmt-fail.rs b/src/test/run-fail/fmt-fail.rs index 029946e593c1..f64515d24c60 100644 --- a/src/test/run-fail/fmt-fail.rs +++ b/src/test/run-fail/fmt-fail.rs @@ -1,4 +1,5 @@ // xfail-stage0 +// xfail-pretty // error-pattern:meh use std; import std::str; diff --git a/src/test/run-fail/fn-constraint-claim.rs b/src/test/run-fail/fn-constraint-claim.rs index 2271e9dcc653..ca8dec6c0c92 100644 --- a/src/test/run-fail/fn-constraint-claim.rs +++ b/src/test/run-fail/fn-constraint-claim.rs @@ -1,5 +1,6 @@ // xfail-stage0 // xfail-stage1 +// xfail-pretty // error-pattern:quux use std; import std::str::*;