Auto merge of #5151 - flip1995:fix_run_pass_tests, r=flip1995
Fix run-pass tests when CARGO_TARGET_DIR is not set r? @lzutao I got ``` thread '[ui] ui/crashes/ice-1969.rs' panicked at 'failed to exec `"target/debug/test_build_base/crashes/ice-1969.stage-id"`: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/pkrones/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.4.0/src/runtest.rs:1350:25 ``` on tests with `// run-pass` locally. The reason for this is, that I haven't set `CARGO_TARGET_DIR` and then `"target"` was used as the `CARGO_TARGET_DIR`. It seems, that `compiletest-rs` cannot deal with relative paths for `// run-pass` tests. changelog: none
This commit is contained in:
commit
63f818e67d
@ -6,7 +6,7 @@ lazy_static! {
|
||||
pub static ref CARGO_TARGET_DIR: PathBuf = {
|
||||
match env::var_os("CARGO_TARGET_DIR") {
|
||||
Some(v) => v.into(),
|
||||
None => "target".into(),
|
||||
None => env::current_dir().unwrap().join("target"),
|
||||
}
|
||||
};
|
||||
pub static ref TARGET_LIB: PathBuf = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user