]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-make/llvm-phase/test.rs
report the total number of errors on compilation failure
[rust.git] / src / test / run-make / llvm-phase / test.rs
index 05c1713561a3ed6678be479569a17aa05d80f982..a75dc7e57a9a265526af8b83134ee1b4dc0581e0 100644 (file)
@@ -22,6 +22,7 @@
 use rustc_trans::ModuleSource;
 use rustc::session::Session;
 use syntax::codemap::FileLoader;
+use std::env;
 use std::io;
 use std::path::{PathBuf, Path};
 
@@ -75,13 +76,15 @@ fn main() {
     path.pop();
     path.pop();
 
-    let args: Vec<String> =
+    let mut args: Vec<String> =
         format!("_ _ --sysroot {} --crate-type dylib", path.to_str().unwrap())
         .split(' ').map(|s| s.to_string()).collect();
+    args.push("--out-dir".to_string());
+    args.push(env::var("TMPDIR").unwrap());
 
     let (result, _) = rustc_driver::run_compiler(
         &args, &mut JitCalls, Some(box JitLoader), None);
     if let Err(n) = result {
-        panic!("Error {}", n);
+        panic!("Error {:?}", n);
     }
 }