]> git.lizzy.rs Git - rust.git/commitdiff
bump compiletest so that we can share the tempdir() call
authorRalf Jung <post@ralfj.de>
Fri, 9 Nov 2018 13:04:22 +0000 (14:04 +0100)
committerRalf Jung <post@ralfj.de>
Fri, 9 Nov 2018 13:04:22 +0000 (14:04 +0100)
Cargo.toml
tests/compiletest.rs

index 390efe0a073a1c560ca7b5a147f5f6105ab6a860..94d13a83fafd52cbde996c1210bf4099cac42f75 100644 (file)
@@ -46,5 +46,5 @@ cargo_miri = ["cargo_metadata"]
 rustc_tests = []
 
 [dev-dependencies]
-compiletest_rs = { version = "0.3.16", features = ["tmp"] }
+compiletest_rs = { version = "0.3.17", features = ["tmp"] }
 colored = "1.6"
index 7644ab1dd723b891cde3e8bafb9dd1e3325bde63..55eaa7bfbab6885ca6395ab420ba75ba294aec3f 100644 (file)
@@ -29,8 +29,8 @@ fn have_fullmir() -> bool {
     std::env::var("MIRI_SYSROOT").is_ok() || rustc_test_suite().is_some()
 }
 
-fn mk_config(mode: &str) -> compiletest::Config {
-    let mut config = compiletest::Config::default();
+fn mk_config(mode: &str) -> compiletest::common::ConfigWithTemp {
+    let mut config = compiletest::Config::default().tempdir();
     config.mode = mode.parse().expect("Invalid mode");
     config.rustc_path = miri_path();
     if rustc_test_suite().is_some() {
@@ -74,7 +74,7 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, need_fullm
     config.target = target.to_owned();
     config.host = host.to_owned();
     config.target_rustcflags = Some(flags.join(" "));
-    compiletest::run_tests(&config.tempdir()); // FIXME: `tempdir` can be done by `mk_config` once `ConfigWithTemp` is exposed as type from compiletest
+    compiletest::run_tests(&config);
 }
 
 fn miri_pass(sysroot: &Path, path: &str, target: &str, host: &str, need_fullmir: bool, opt: bool) {
@@ -107,7 +107,7 @@ fn miri_pass(sysroot: &Path, path: &str, target: &str, host: &str, need_fullmir:
     config.target = target.to_owned();
     config.host = host.to_owned();
     config.target_rustcflags = Some(flags.join(" "));
-    compiletest::run_tests(&config.tempdir()); // FIXME: `tempdir` can be done by `mk_config` once `ConfigWithTemp` is exposed as type from compiletest
+    compiletest::run_tests(&config);
 }
 
 fn is_target_dir<P: Into<PathBuf>>(path: P) -> bool {