diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 60ef76528e849..50fe42b8fee9c 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -144,9 +144,13 @@ pub fn load_props(testfile: &Path) -> TestProps { } pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool { - fn ignore_target(config: &Config) -> String { + fn ignore_os(config: &Config) -> String { format!("ignore-{}", util::get_os(config.target.as_slice())) } + fn ignore_arch(config: &Config) -> String { + format!("ignore-{}", + config.target.as_slice().split('-').next().unwrap()) + } fn ignore_stage(config: &Config) -> String { format!("ignore-{}", config.stage_id.as_slice().split('-').next().unwrap()) @@ -209,7 +213,8 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool { let val = iter_header(testfile, |ln| { !parse_name_directive(ln, "ignore-test") && - !parse_name_directive(ln, ignore_target(config).as_slice()) && + !parse_name_directive(ln, ignore_os(config).as_slice()) && + !parse_name_directive(ln, ignore_arch(config).as_slice()) && !parse_name_directive(ln, ignore_stage(config).as_slice()) && !(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) && !(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&