From 2ff5963b9da3a0be40d3ea56cf9d4063fc5ac32d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 18 Jan 2014 15:22:52 -0800 Subject: [PATCH 1/2] xfail more external syntax extension tests on android --- src/test/compile-fail/macro-crate-unexported-macro.rs | 1 + src/test/compile-fail/phase-syntax-doesnt-resolve.rs | 1 + src/test/run-pass-fulldeps/macro-crate.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/test/compile-fail/macro-crate-unexported-macro.rs b/src/test/compile-fail/macro-crate-unexported-macro.rs index d6867e780efbc..feebfd104e789 100644 --- a/src/test/compile-fail/macro-crate-unexported-macro.rs +++ b/src/test/compile-fail/macro-crate-unexported-macro.rs @@ -10,6 +10,7 @@ // aux-build:macro_crate_test.rs // xfail-stage1 +// xfail-android #[feature(phase)]; diff --git a/src/test/compile-fail/phase-syntax-doesnt-resolve.rs b/src/test/compile-fail/phase-syntax-doesnt-resolve.rs index c7e49d2dd607f..49dc81dc275b1 100644 --- a/src/test/compile-fail/phase-syntax-doesnt-resolve.rs +++ b/src/test/compile-fail/phase-syntax-doesnt-resolve.rs @@ -10,6 +10,7 @@ // aux-build:macro_crate_test.rs // xfail-stage1 +// xfail-android #[feature(phase)]; diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs index 0073c1c33fba5..413fb71891648 100644 --- a/src/test/run-pass-fulldeps/macro-crate.rs +++ b/src/test/run-pass-fulldeps/macro-crate.rs @@ -11,6 +11,7 @@ // aux-build:macro_crate_test.rs // xfail-stage1 // xfail-fast +// xfail-android #[feature(phase)]; From 2d656d6285e5db5c2a23c0144b5b97e637e61a6c Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 18 Jan 2014 18:23:46 -0800 Subject: [PATCH 2/2] Pass the correct --target flag when type checking pretty-printed code in tests This makes pretty print tests that have aux crates work correctly on Android. Without they generate errors ICEs about incorrect node ids. Not sure why. --- src/compiletest/runtest.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 6b822fedda623..9ebc8236f6fec 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -237,9 +237,15 @@ actual:\n\ fn make_typecheck_args(config: &config, props: &TestProps, testfile: &Path) -> ProcArgs { let aux_dir = aux_output_dir_name(config, testfile); + let target = if props.force_host { + config.host.as_slice() + } else { + config.target.as_slice() + }; // FIXME (#9639): This needs to handle non-utf8 paths let mut args = ~[~"-", ~"--no-trans", ~"--lib", + ~"--target=" + target, ~"-L", config.build_base.as_str().unwrap().to_owned(), ~"-L", aux_dir.as_str().unwrap().to_owned()];