update compiletest; we do not need tempdir any more
This commit is contained in:
parent
df895cd9d4
commit
8dff161bcb
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -68,11 +68,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "compiletest_rs"
|
||||
version = "0.2.9"
|
||||
version = "0.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -184,12 +185,11 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"compiletest_rs 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"compiletest_rs 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_miri 0.1.0",
|
||||
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -349,7 +349,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d"
|
||||
"checksum cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "be1057b8462184f634c3a208ee35b0f935cfd94b694b26deadccd98732088d7b"
|
||||
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
|
||||
"checksum compiletest_rs 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc4720203de7b490e2808cad3e9090e8850eed4ecd4176b246551a952f4ead7"
|
||||
"checksum compiletest_rs 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2741d378feb7a434dba54228c89a70b4e427fee521de67cdda3750b8a0265f5a"
|
||||
"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299"
|
||||
"checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9"
|
||||
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
|
||||
|
@ -33,8 +33,7 @@ rustc_miri = { path = "src/librustc_mir" }
|
||||
cargo_miri = ["cargo_metadata"]
|
||||
|
||||
[dev-dependencies]
|
||||
compiletest_rs = "0.2.6"
|
||||
tempdir = "0.3"
|
||||
compiletest_rs = { version = "0.2.10", features = ["tmp"] }
|
||||
|
||||
[workspace]
|
||||
exclude = ["xargo", "cargo-miri-test", "rustc_tests"]
|
||||
|
@ -1,12 +1,10 @@
|
||||
#![feature(slice_concat_ext)]
|
||||
|
||||
extern crate compiletest_rs as compiletest;
|
||||
extern crate tempdir;
|
||||
|
||||
use std::slice::SliceConcatExt;
|
||||
use std::path::{PathBuf, Path};
|
||||
use std::io::Write;
|
||||
use tempdir::TempDir;
|
||||
|
||||
macro_rules! eprintln {
|
||||
($($arg:tt)*) => {
|
||||
@ -37,10 +35,8 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b
|
||||
path,
|
||||
target
|
||||
);
|
||||
let build_dir = TempDir::new("miri-tests").unwrap();
|
||||
let mut config = compiletest::Config::default();
|
||||
let mut config = compiletest::Config::default().tempdir();
|
||||
config.mode = "compile-fail".parse().expect("Invalid mode");
|
||||
config.build_base = build_dir.path().to_owned();
|
||||
config.rustc_path = miri_path();
|
||||
let mut flags = Vec::new();
|
||||
if rustc_test_suite().is_some() {
|
||||
@ -70,10 +66,8 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b
|
||||
|
||||
fn run_pass(path: &str) {
|
||||
eprintln!("## Running run-pass tests in {} against rustc", path);
|
||||
let build_dir = TempDir::new("miri-tests").unwrap();
|
||||
let mut config = compiletest::Config::default();
|
||||
let mut config = compiletest::Config::default().tempdir();
|
||||
config.mode = "run-pass".parse().expect("Invalid mode");
|
||||
config.build_base = build_dir.path().to_owned();
|
||||
config.src_base = PathBuf::from(path);
|
||||
if let Some(rustc_path) = rustc_test_suite() {
|
||||
config.rustc_path = rustc_path;
|
||||
@ -95,10 +89,8 @@ fn miri_pass(path: &str, target: &str, host: &str, fullmir: bool, opt: bool) {
|
||||
target,
|
||||
opt_str
|
||||
);
|
||||
let build_dir = TempDir::new("miri-tests").unwrap();
|
||||
let mut config = compiletest::Config::default();
|
||||
let mut config = compiletest::Config::default().tempdir();
|
||||
config.mode = "mir-opt".parse().expect("Invalid mode");
|
||||
config.build_base = build_dir.path().to_owned();
|
||||
config.src_base = PathBuf::from(path);
|
||||
config.target = target.to_owned();
|
||||
config.host = host.to_owned();
|
||||
|
Loading…
x
Reference in New Issue
Block a user