]> git.lizzy.rs Git - rust.git/commitdiff
Remove inception test for now.
authorScott Olson <scott@solson.me>
Sat, 11 Jun 2016 19:10:25 +0000 (13:10 -0600)
committerScott Olson <scott@solson.me>
Sat, 11 Jun 2016 19:10:25 +0000 (13:10 -0600)
src/bin/miri.rs
tests/compiletest.rs
tests/run-fail/inception.rs [deleted file]

index b42c40031fd30f1f3aea3379d4d3cabc7f1f6762..f14eb39439ef669e136ffd837db8946a9552c9b7 100644 (file)
@@ -1,5 +1,4 @@
-#![feature(rustc_private, custom_attribute)]
-#![allow(unused_attributes)]
+#![feature(rustc_private)]
 
 extern crate getopts;
 extern crate miri;
@@ -114,14 +113,12 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     err.emit();
 }
 
-#[miri_run]
 fn main() {
     init_logger();
     let args: Vec<String> = std::env::args().collect();
     rustc_driver::run_compiler(&args, &mut MiriCompilerCalls);
 }
 
-#[miri_run]
 fn init_logger() {
     const NSPACES: usize = 40;
     let format = |record: &log::LogRecord| {
index 184e28241324286452638d06293831c81a6cfb3c..2fc1e615cff1965d9fd16b9f93234878c1ea2268 100644 (file)
@@ -27,5 +27,4 @@ fn run_mode(mode: &'static str) {
 fn compile_test() {
     run_mode("compile-fail");
     run_mode("run-pass");
-    run_mode("run-fail");
 }
diff --git a/tests/run-fail/inception.rs b/tests/run-fail/inception.rs
deleted file mode 100644 (file)
index f0fb411..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// error-pattern:no mir for DefId
-
-use std::env;
-use std::process::{Command, Output};
-
-fn run_miri(file: &str, sysroot: &str) -> Output {
-    let path = env::current_dir().unwrap();
-    let libpath = path.join("target").join("debug");
-    let libpath = libpath.to_str().unwrap();
-    let libpath2 = path.join("target").join("debug").join("deps");
-    let libpath2 = libpath2.to_str().unwrap();
-    let mut args = vec![
-        "run".to_string(), "--".to_string(),
-        "--sysroot".to_string(), sysroot.to_string(),
-        "-L".to_string(), libpath.to_string(),
-        "-L".to_string(), libpath2.to_string(),
-        file.to_string()
-    ];
-    for file in std::fs::read_dir("target/debug/deps").unwrap() {
-        let file = file.unwrap();
-        if file.file_type().unwrap().is_file() {
-            let path = file.path();
-            if let Some(ext) = path.extension() {
-                if ext == "rlib" {
-                    let name = path.file_stem().unwrap().to_str().unwrap();
-                    if let Some(dash) = name.rfind('-') {
-                        if name.starts_with("lib") {
-                            args.push("--extern".to_string());
-                            args.push(format!("{}={}", &name[3..dash], path.to_str().unwrap()));
-                        }
-                    }
-                }
-            }
-        }
-    }
-    Command::new("cargo")
-        .args(&args)
-        .output()
-        .unwrap_or_else(|e| panic!("failed to execute process: {}", e))
-}
-
-fn main() {
-    let sysroot = env::var("RUST_SYSROOT").expect("env variable `RUST_SYSROOT` not set");
-    let test_run = run_miri("src/bin/miri.rs", &sysroot);
-
-    if test_run.status.code().unwrap_or(-1) != 0 {
-        println!("{}", String::from_utf8(test_run.stdout).unwrap());
-        panic!("{}", String::from_utf8(test_run.stderr).unwrap());
-    }
-}