rust-lang / rustwide

Execute your code on the Rust ecosystem.
Apache License 2.0
180 stars 41 forks source link

Tests fail with a shared CARGO_TARGET_DIR #29

Open jyn514 opened 4 years ago

jyn514 commented 4 years ago
$ CARGO_TARGET_DIR=/home/joshua/.local/lib/cargo/target cargo test hello_world
test buildtest::inside_docker::test_hello_world ... FAILED
test buildtest::test_hello_world ... ok

---- buildtest::inside_docker::test_hello_world stdout ----
thread 'buildtest::inside_docker::test_hello_world' panicked at 'called `Result::unwrap()` on an `Err` value: StripPrefixError(())

the working directory is not a parent of the test binary', tests/buildtest/inside_docker.rs:15:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ CARGO_TARGET_DIR=target cargo test hello_world
test buildtest::test_hello_world ... ok
test buildtest::inside_docker::test_hello_world ... ok

Additionally, rustwide seems to be clearing the cache on every test run with a shared CARGO_TARGET_DIR which is very annoying.