|
2 | 2 | # ^ A shebang isn't required, but allows a justfile to be executed
|
3 | 3 | # like a script, with `./justfile test`, for example.
|
4 | 4 |
|
| 5 | +j := quote(just_executable()) |
| 6 | + |
5 | 7 | default:
|
6 |
| - {{ quote(just_executable()) }} --list |
| 8 | + {{ j }} --list |
7 | 9 |
|
8 | 10 | alias t := test
|
9 | 11 | alias c := check
|
@@ -191,35 +193,37 @@ unit-tests:
|
191 | 193 | unit-tests-flaky:
|
192 | 194 | cargo test -p gix --features async-network-client-async-std
|
193 | 195 |
|
194 |
| -target_dir := `cargo metadata --format-version 1 | jq -r .target_directory` |
195 |
| -ein := quote(target_dir / 'debug/ein') |
196 |
| -gix := quote(target_dir / 'debug/gix') |
197 |
| -jtt := quote(target_dir / 'debug/jtt') |
198 |
| -it := quote(target_dir / 'debug/it') |
| 196 | +# depend on this to pre-generate metadata, and/or use it inside a recipe as `"$({{ j }} dbg)"` |
| 197 | +[private] |
| 198 | +dbg: |
| 199 | + set -eux; \ |
| 200 | + target_dir="$(cargo metadata --format-version 1 | jq -r .target_directory)"; \ |
| 201 | + test -n "$target_dir"; \ |
| 202 | + echo "$target_dir/debug" |
199 | 203 |
|
200 | 204 | # run journey tests (max)
|
201 |
| -journey-tests: |
| 205 | +journey-tests: dbg |
202 | 206 | cargo build --features http-client-curl-rustls
|
203 | 207 | cargo build -p gix-testtools --bin jtt
|
204 |
| - tests/journey.sh {{ ein }} {{ gix }} {{ jtt }} max |
| 208 | + dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" max |
205 | 209 |
|
206 | 210 | # run journey tests (max-pure)
|
207 |
| -journey-tests-pure: |
| 211 | +journey-tests-pure: dbg |
208 | 212 | cargo build --no-default-features --features max-pure
|
209 | 213 | cargo build -p gix-testtools --bin jtt
|
210 |
| - tests/journey.sh {{ ein }} {{ gix }} {{ jtt }} max-pure |
| 214 | + dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" max-pure |
211 | 215 |
|
212 | 216 | # run journey tests (small)
|
213 |
| -journey-tests-small: |
| 217 | +journey-tests-small: dbg |
214 | 218 | cargo build --no-default-features --features small
|
215 | 219 | cargo build -p gix-testtools
|
216 |
| - tests/journey.sh {{ ein }} {{ gix }} {{ jtt }} small |
| 220 | + dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" small |
217 | 221 |
|
218 | 222 | # run journey tests (lean-async)
|
219 |
| -journey-tests-async: |
| 223 | +journey-tests-async: dbg |
220 | 224 | cargo build --no-default-features --features lean-async
|
221 | 225 | cargo build -p gix-testtools
|
222 |
| - tests/journey.sh {{ ein }} {{ gix }} {{ jtt }} async |
| 226 | + dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" async |
223 | 227 |
|
224 | 228 | # Run cargo-diet on all crates to see that they are still in bound
|
225 | 229 | check-size:
|
@@ -260,7 +264,7 @@ find-yanked:
|
260 | 264 | # Find shell scripts whose +x/-x bits and magic bytes (e.g. `#!`) disagree
|
261 | 265 | check-mode:
|
262 | 266 | cargo build -p internal-tools
|
263 |
| - {{ it }} check-mode |
| 267 | + cargo run -p internal-tools -- check-mode |
264 | 268 |
|
265 | 269 | # Delete gix-packetline-blocking/src and regenerate from gix-packetline/src
|
266 | 270 | copy-packetline:
|
|
0 commit comments