Skip to content

Commit

Permalink
Pretty-print test the rfail tests. Issue rust-lang#789
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Aug 2, 2011
1 parent 0a6e336 commit e13390a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
33 changes: 26 additions & 7 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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) \
Expand Down Expand Up @@ -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_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_ARGS$(2))
$$(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
Expand Down
1 change: 1 addition & 0 deletions src/test/run-fail/fmt-fail.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// xfail-stage0
// xfail-pretty
// error-pattern:meh
use std;
import std::str;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-fail/fn-constraint-claim.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// xfail-stage0
// xfail-stage1
// xfail-pretty
// error-pattern:quux
use std;
import std::str::*;
Expand Down

0 comments on commit e13390a

Please sign in to comment.