tape: fix path for test files

This commit is contained in:
Dietmar Maurer 2021-02-06 09:32:50 +01:00
parent 2f26b8668a
commit ced7838de4

View File

@ -25,10 +25,8 @@ use crate::{
}; };
fn create_testdir(name: &str) -> Result<PathBuf, Error> { fn create_testdir(name: &str) -> Result<PathBuf, Error> {
let mut testdir: PathBuf = std::env::var("CARGO_TARGET_DIR") let mut testdir: PathBuf = String::from("./target/testout").into();
.unwrap_or(String::from("./target/debug")) testdir.push(std::module_path!());
.into();
testdir.push(format!("{}.testout", std::module_path!()));
testdir.push(name); testdir.push(name);
let _ = std::fs::remove_dir_all(&testdir); let _ = std::fs::remove_dir_all(&testdir);