From 01d1ec25f744eb6d7a12a6f1149321aa3688b2aa Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Mon, 16 Mar 2015 18:42:15 +0100 Subject: [PATCH] rustc: Fix test failure due to hardcoded path to /home --- .../compilers/rustc/patches/alpha2.patch | 11 ++++++++++ .../compilers/rustc/patches/head.patch | 21 ++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/rustc/patches/alpha2.patch b/pkgs/development/compilers/rustc/patches/alpha2.patch index 8c15af5aca9b..8165a42cf85c 100644 --- a/pkgs/development/compilers/rustc/patches/alpha2.patch +++ b/pkgs/development/compilers/rustc/patches/alpha2.patch @@ -42,3 +42,14 @@ index ef849bb..e090b99 100644 } } +diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs +index 049e08d..30b9d2a 100644 +--- a/src/test/run-pass/issue-20797.rs ++++ b/src/test/run-pass/issue-20797.rs +@@ -90,5 +90,5 @@ impl Iterator for Subpaths { + } + + fn main() { +- let mut walker: Subpaths = Subpaths::walk(&Path::new("/home")).unwrap(); ++ let mut walker: Subpaths = Subpaths::walk(&Path::new("/tmp")).unwrap(); + } diff --git a/pkgs/development/compilers/rustc/patches/head.patch b/pkgs/development/compilers/rustc/patches/head.patch index a0ecdaeb0495..f82f85fb1626 100644 --- a/pkgs/development/compilers/rustc/patches/head.patch +++ b/pkgs/development/compilers/rustc/patches/head.patch @@ -15,11 +15,11 @@ index ca59b1c..65ee7bf 100755 # do not fail if one of the above fails, as all we need is a working rustc! exit 0 diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs -index 6bf7453..319f9af 100644 +index ed44bf8..2b84627 100644 --- a/src/librustc_back/archive.rs +++ b/src/librustc_back/archive.rs -@@ -54,7 +54,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option, - paths: &[&Path]) -> ProcessOutput { +@@ -57,7 +57,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option, + paths: &[&Path]) -> Output { let ar = match *maybe_ar_prog { Some(ref ar) => &ar[..], - None => "ar" @@ -28,10 +28,10 @@ index 6bf7453..319f9af 100644 let mut cmd = Command::new(ar); diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs -index ea5001a..911445c 100644 +index 3087a8e..578448f 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs -@@ -350,8 +350,8 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri +@@ -352,8 +352,8 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri pub fn get_cc_prog(sess: &Session) -> String { match sess.opts.cg.linker { @@ -42,3 +42,14 @@ index ea5001a..911445c 100644 } } +diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs +index 049e08d..30b9d2a 100644 +--- a/src/test/run-pass/issue-20797.rs ++++ b/src/test/run-pass/issue-20797.rs +@@ -90,5 +90,5 @@ impl Iterator for Subpaths { + } + + fn main() { +- let mut walker: Subpaths = Subpaths::walk(&Path::new("/home")).unwrap(); ++ let mut walker: Subpaths = Subpaths::walk(&Path::new("/tmp")).unwrap(); + }