Skip to content

Commit 314b02b

Browse files
committed
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
1 parent 4c967e7 commit 314b02b

6 files changed

+7
-5
lines changed

src/compiletest/header.rs

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ pub fn is_test_ignored(config: &config, testfile: &Path) -> bool {
108108
else if parse_name_directive(ln, ignore_stage(config)) { false }
109109
else if config.mode == common::mode_pretty &&
110110
parse_name_directive(ln, "ignore-pretty") { false }
111+
else if config.target != config.host &&
112+
parse_name_directive(ln, "ignore-cross-compile") { false }
111113
else { true }
112114
});
113115

src/test/compile-fail/syntax-extension-fourcc-bad-len.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-stage1
1212
// ignore-pretty
13-
// ignore-android
13+
// ignore-cross-compile #12102
1414

1515
#[feature(phase)];
1616

src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-stage1
1212
// ignore-pretty
13-
// ignore-android
13+
// ignore-cross-compile #12102
1414

1515
#[feature(phase)];
1616

src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-stage1
1212
// ignore-pretty
13-
// ignore-android
13+
// ignore-cross-compile #12102
1414

1515
#[feature(phase)];
1616

src/test/compile-fail/syntax-extension-fourcc-non-literal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-stage1
1212
// ignore-pretty
13-
// ignore-android
13+
// ignore-cross-compile #12102
1414

1515
#[feature(phase)];
1616

src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-stage1
1212
// ignore-pretty
13-
// ignore-android
13+
// ignore-cross-compile #12102
1414

1515
#[feature(phase)];
1616

0 commit comments

Comments
 (0)