Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
tests: ensure that all builds are made in the same target directory
Merged levitte opened 17 days ago

‘build test’ builds radicle-remote-helper and radicle-cli, making the assumption that the target directory is always within the source directory. However, the user may have a different idea, specified with the environment variable CARGO_TARGET_DIR (supported by cargo, see https://doc.rust-lang.org/cargo/reference/environment-variables.html).

This change adds support for CARGO_TARGET_DIR, with a fallback to ‘target’ at the top of the source tree if CARGO_TARGET_DIR is undefined.

levitte opened with revision e55ed298 on base 80c1bba7 +9 -9 17 days ago

‘build test’ builds radicle-remote-helper and radicle-cli, making the assumption that the target directory is always within the source directory. However, the user may have a different idea, specified with the environment variable CARGO_TARGET_DIR (supported by cargo, see https://doc.rust-lang.org/cargo/reference/environment-variables.html).

This change adds support for CARGO_TARGET_DIR, with a fallback to ‘target’ at the top of the source tree if CARGO_TARGET_DIR is undefined.

levitte commented on revision 1 17 days ago

My reason for this is that I wanted to build with a strictly read-only source tree, for example:

$ cargo clean
$ git clean -dfx
$ (echo "export CARGO_TARGET_DIR=/RL-test/target"; echo "cargo test --locked --workspace --no-fail-fast") \
> | podman run -i -v $(pwd):/RL-test/wrk:ro -w /RL-test/wrk rust:trixie bash -xs 2>&1 | tee RL-test.log 
lorenz pushed revision 2 925f82de on base 80c1bba7 +9 -9 15 days ago

Reword commit message.

lorenz merged revision 925f82de at adfd89f6 15 days ago