From 314b02b373becea44ebaf194ce6c49ff408e0dba Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 11 Feb 2014 11:44:01 -0800 Subject: [PATCH] Add ignore-cross-compile directive for compiletest Loadable syntax extensions don't work when cross compiling (see #12102), so the fourcc tests all need to be ignored. They're valuable tests, so they shouldn't be outright ignored, so they're now flagged with ignore-cross-compile --- src/compiletest/header.rs | 2 ++ src/test/compile-fail/syntax-extension-fourcc-bad-len.rs | 2 +- src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs | 2 +- src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs | 2 +- src/test/compile-fail/syntax-extension-fourcc-non-literal.rs | 2 +- .../compile-fail/syntax-extension-fourcc-unsupported-literal.rs | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 5271cfb9b8e..0c965b7c6c3 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -108,6 +108,8 @@ pub fn is_test_ignored(config: &config, testfile: &Path) -> bool { else if parse_name_directive(ln, ignore_stage(config)) { false } else if config.mode == common::mode_pretty && parse_name_directive(ln, "ignore-pretty") { false } + else if config.target != config.host && + parse_name_directive(ln, "ignore-cross-compile") { false } else { true } }); diff --git a/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs b/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs index 260462b7042..61594e642bf 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs @@ -10,7 +10,7 @@ // ignore-stage1 // ignore-pretty -// ignore-android +// ignore-cross-compile #12102 #[feature(phase)]; diff --git a/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs b/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs index c6d89a45e0e..bfc755eda33 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs @@ -10,7 +10,7 @@ // ignore-stage1 // ignore-pretty -// ignore-android +// ignore-cross-compile #12102 #[feature(phase)]; diff --git a/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs b/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs index 061cff21748..7b090e3e947 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs @@ -10,7 +10,7 @@ // ignore-stage1 // ignore-pretty -// ignore-android +// ignore-cross-compile #12102 #[feature(phase)]; diff --git a/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs b/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs index 16c61c55500..5f6446c683c 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs @@ -10,7 +10,7 @@ // ignore-stage1 // ignore-pretty -// ignore-android +// ignore-cross-compile #12102 #[feature(phase)]; diff --git a/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs b/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs index 98a39e80cda..48c6d218df4 100644 --- a/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs +++ b/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs @@ -10,7 +10,7 @@ // ignore-stage1 // ignore-pretty -// ignore-android +// ignore-cross-compile #12102 #[feature(phase)];