Description of the issue
Description:
Nextest always tries to create the store directory at the workspace root, which fails if the workspace is read-only.
Steps to reproduce:
- Go to any existing project, ensure the
target directory is clean (or at least target/nextest does not exist)
- Launch a Docker container that mounts the current workspace as read only, and sets
CARGO_TARGET_DIR. : docker run --rm -e CARGO_TARGET_DIR=/target -v "$(pwd):/checkout:ro" -it rust bash
- Install nextest:
cargo install cargo-nextest
cd /checkout
- Try running tests normally:
cargo test. This should work
- Try running tests via nextest:
cargo nextest run. This fails with something like:
error: failed to create store dir at `/checkout/target/nextest/default`
Caused by:
Read-only file system (os error 30)
Expected outcome
By default, rather than using a path relative to the workspace root, nextest should create its store directory within CARGO_TARGET_DIR if it is set.
Actual result
Unable to create the file (see above)
Nextest version
cargo-nextest 0.9.87 (fee71ad7b 2024-12-17)
release: 0.9.87
commit-hash: fee71ad7ba08be06519cf9eeb495c6fce0a2e888
commit-date: 2024-12-17
host: aarch64-unknown-linux-gnu
Additional context
No response
Description of the issue
Description:
Nextest always tries to create the store directory at the workspace root, which fails if the workspace is read-only.
Steps to reproduce:
targetdirectory is clean (or at leasttarget/nextestdoes not exist)CARGO_TARGET_DIR. :docker run --rm -e CARGO_TARGET_DIR=/target -v "$(pwd):/checkout:ro" -it rust bashcargo install cargo-nextestcd /checkoutcargo test. This should workcargo nextest run. This fails with something like:Expected outcome
By default, rather than using a path relative to the workspace root, nextest should create its store directory within
CARGO_TARGET_DIRif it is set.Actual result
Unable to create the file (see above)
Nextest version
Additional context
No response