Add xfail-pretty test directive. Issue #789
Indicates that this test should not be used to test the pretty-printer
This commit is contained in:
parent
ce8cac5d9a
commit
1702b8507d
2 changed files with 9 additions and 3 deletions
|
|
@ -158,7 +158,7 @@ fn make_test(cx: &cx, testfile: &str, configport: &port[str]) ->
|
|||
test::test_desc {
|
||||
{name: make_test_name(cx.config, testfile),
|
||||
fn: make_test_closure(testfile, chan(configport)),
|
||||
ignore: header::is_test_ignored(cx.config.stage_id, testfile)}
|
||||
ignore: header::is_test_ignored(cx.config, testfile)}
|
||||
}
|
||||
|
||||
fn make_test_name(config: &config, testfile: &str) -> str {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ import std::option;
|
|||
import std::str;
|
||||
import std::io;
|
||||
|
||||
import common::config;
|
||||
|
||||
export test_props;
|
||||
export load_props;
|
||||
export is_test_ignored;
|
||||
|
|
@ -26,12 +28,16 @@ fn load_props(testfile: &str) -> test_props {
|
|||
ret {error_patterns: error_patterns, compile_flags: compile_flags};
|
||||
}
|
||||
|
||||
fn is_test_ignored(stage_id: &str, testfile: &str) -> bool {
|
||||
fn is_test_ignored(config: &config, testfile: &str) -> bool {
|
||||
let found = false;
|
||||
for each ln: str in iter_header(testfile) {
|
||||
// FIXME: Can't return or break from iterator
|
||||
found = found
|
||||
|| parse_name_directive(ln, "xfail-" + stage_id);
|
||||
|| parse_name_directive(ln, "xfail-" + config.stage_id);
|
||||
if (config.mode == common::mode_pretty) {
|
||||
found = found
|
||||
|| parse_name_directive(ln, "xfail-pretty");
|
||||
}
|
||||
}
|
||||
ret found;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue