Skip to content

Commit 55d5ad5

Browse files
test: e2e 298 reads the driver's family and declares its skip when no row is picked
compiler.family names the driver's family (clang), and the candidate loop ended on a failed test under set -e: a macOS host, whose musl rows are served by openkal-platform, ended the script without its skip. Measured by lowering musl-gcc's priority on Linux, which serves those rows as macOS does. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 7d3d48b commit 55d5ad5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎tests/e2e/298_overriding_a_convention_requires_replacing_it.sh‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ hostArch="$("$MCPP" toolchain list --format json 2>/dev/null \
9292
# openkal-platform, whose compiler is llvm, on a macOS host. There llvm alone is
9393
# the row's own service, and nothing was removed. The compiler the selection
9494
# takes with no compiler stated is that service, so a candidate counts only
95-
# where it is not llvm.
95+
# where it is not llvm (`compiler.family` names the driver's family: `clang`).
9696
mkdir -p "$work/neutral"
9797
printf '[package]\nname = "neutral"\nversion = "0.1.0"\n' > "$work/neutral/mcpp.toml"
9898
served_by_its_convention() {
9999
local fam
100100
fam="$(cd "$work/neutral" && "$MCPP" why toolchain --target "$1" --format json 2>/dev/null \
101101
| jq -r '.data.compiler.family // ""' | tr -d '\r')"
102-
[ -n "$fam" ] && [ "$fam" != llvm ]
102+
[ -n "$fam" ] && [ "$fam" != llvm ] && [ "$fam" != clang ]
103103
}
104104
pick() {
105105
local t
@@ -110,8 +110,9 @@ pick() {
110110
| select(.status != "planned")
111111
| select($a == "" or (.target | startswith($a + "-")))
112112
| .target] | unique[]' | tr -d '\r'); do
113-
served_by_its_convention "$t" && { echo "$t"; return; }
113+
served_by_its_convention "$t" && { echo "$t"; return 0; }
114114
done
115+
return 0
115116
}
116117
pinned="$(pick "$hostArch")"
117118
[ -n "$pinned" ] || pinned="$(pick "")"

0 commit comments

Comments
 (0)