Commit 100b84c
fix(ci): pass --target and --target-dir in on-demand prqlc build
When CI runs tests with --target=<triple>, cargo places artifacts in
target/<triple>/debug/ instead of target/debug/. The on-demand build in
test_utils::prqlc_bin_path() was running `cargo build --bin prqlc` without
--target, so the binary landed in the wrong directory and insta-cmd tests
could not find it.
Fix by:
- Emitting PRQLC_BUILD_TARGET from build.rs (the TARGET env var is only
available in build scripts)
- Detecting the target triple from the test binary path and passing
--target to the on-demand build when needed
- Also passing --target-dir to handle custom target directories like
those used by cargo-llvm-cov
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bb073fd commit 100b84c
2 files changed
Lines changed: 42 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
42 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
43 | 75 | | |
44 | 76 | | |
45 | 77 | | |
| |||
0 commit comments