tests: ensure that all builds are made in the same target directory
‘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.
1 file changed
+9
-9
80c1bba7
→
adfd89f6
modified crates/radicle-cli-test/src/lib.rs
@@ -199,13 +199,11 @@ impl TestFormula {
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -531,6 +529,12 @@ fn cargo_manifest_dir() -> PathBuf {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -540,11 +544,7 @@ fn bins(cwd: PathBuf) -> Vec<PathBuf> {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|