Skip to content

Commit bdacf39

Browse files
test: e2e 298 overrides only a row its convention serves on this host
A macOS host serves aarch64-linux-musl through openkal-platform, whose compiler is llvm; llvm alone there is the row's own service. The test now picks a row whose selection takes a non-llvm compiler and otherwise declares a skip, which the target-matrix step accepts off Linux. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent a09b891 commit bdacf39

2 files changed

Lines changed: 33 additions & 12 deletions

File tree

‎.github/workflows/ci-target-matrix.yml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ jobs:
123123
# payload (it backs the host row), so that job uses `check` and the
124124
# test is guaranteed to be exercised somewhere on every run. Without
125125
# that, a reason accepted everywhere is a test that runs nowhere.
126-
check_or_declared_skip() { # log ok-line acceptable-skip-substring
126+
check_or_declared_skip() { # log ok-line acceptable-skip-pattern (ERE)
127127
grep -qF "$2" "$1".log && { echo " ok $1"; return 0; }
128-
if grep -q '^SKIP:' "$1".log && grep -qF "$3" "$1".log; then
128+
if grep -q '^SKIP:' "$1".log && grep -qE "$3" "$1".log; then
129129
echo " ok $1 (declared skip: $(grep -m1 '^SKIP:' "$1".log))"
130130
return 0
131131
fi
@@ -153,11 +153,13 @@ jobs:
153153
check 298_overriding_a_convention_requires_replacing_it.sh \
154154
"OK: a convention may be overridden, but not merely removed" || fail=1
155155
else
156-
# Non-Linux rows may restore a cache with no declared LLVM.
156+
# Non-Linux rows may restore a cache with no declared LLVM, and a
157+
# macOS host serves every gcc-pinned row through openkal-platform,
158+
# whose compiler is llvm: no row there is overridden by llvm.
157159
# Both Linux hosts require the assertion after native provisioning.
158160
check_or_declared_skip 298_overriding_a_convention_requires_replacing_it.sh \
159161
"OK: a convention may be overridden, but not merely removed" \
160-
"llvm is not installed here" || fail=1
162+
"llvm is not installed here|served by a non-llvm convention" || fail=1
161163
fi
162164
163165
# ── 2026.8.26.2: an answer mcpp already had, now used ─────────────

‎tests/e2e/298_overriding_a_convention_requires_replacing_it.sh‎

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,38 @@ hostArch="$("$MCPP" toolchain list --format json 2>/dev/null \
8585
# A ROW WHOSE PAYLOAD llvm PAIRS WITH IS NOT ONE. The MinGW-w64 payload is
8686
# clang's sysroot as well as gcc's (SPEC-016 §3, e2e 1044): `x86_64-windows-gnu`
8787
# with llvm alone is served, not overridden, and is left out here.
88+
#
89+
# AND A ROW IS OVERRIDDEN ONLY WHERE ITS CONVENTION IS WHAT SERVES IT HERE. Since
90+
# 2026.11.9.1 a row is served by a provider chosen per host (SPEC-016 §4):
91+
# `aarch64-linux-musl` takes the musl cross payload on a Linux host and
92+
# openkal-platform, whose compiler is llvm, on a macOS host. There llvm alone is
93+
# the row's own service, and nothing was removed. The compiler the selection
94+
# takes with no compiler stated is that service, so a candidate counts only
95+
# where it is not llvm.
96+
mkdir -p "$work/neutral"
97+
printf '[package]\nname = "neutral"\nversion = "0.1.0"\n' > "$work/neutral/mcpp.toml"
98+
served_by_its_convention() {
99+
local fam
100+
fam="$(cd "$work/neutral" && "$MCPP" why toolchain --target "$1" --format json 2>/dev/null \
101+
| jq -r '.data.compiler.family // ""' | tr -d '\r')"
102+
[ -n "$fam" ] && [ "$fam" != llvm ]
103+
}
88104
pick() {
89-
"$MCPP" toolchain list --format json 2>/dev/null \
90-
| jq -r --arg a "$1" '[.data.targets[]
91-
| select(.pin | startswith("gcc"))
92-
| select(.target != "x86_64-windows-gnu")
93-
| select(.status != "planned")
94-
| select($a == "" or (.target | startswith($a + "-")))
95-
| .target][0] // empty' | tr -d '\r'
105+
local t
106+
for t in $("$MCPP" toolchain list --format json 2>/dev/null \
107+
| jq -r --arg a "$1" '[.data.targets[]
108+
| select(.pin | startswith("gcc"))
109+
| select(.target != "x86_64-windows-gnu")
110+
| select(.status != "planned")
111+
| select($a == "" or (.target | startswith($a + "-")))
112+
| .target] | unique[]' | tr -d '\r'); do
113+
served_by_its_convention "$t" && { echo "$t"; return; }
114+
done
96115
}
97116
pinned="$(pick "$hostArch")"
98117
[ -n "$pinned" ] || pinned="$(pick "")"
99118
if [ -z "$pinned" ]; then
100-
echo "SKIP: no target row here pins a non-llvm toolchain"
119+
echo "SKIP: no target row here is served by a non-llvm convention"
101120
exit 0
102121
fi
103122

0 commit comments

Comments
 (0)