Skip to content

Commit 73e4429

Browse files
committed
fix(e2e): 231 must not assume gcc — ask the platform what it resolves
`--toolchain gcc@16.1.0` 写死在断言里,而 fixture 在 macOS 与 Windows 上钉的是 llvm: 那台机器上根本没有 gcc 载荷,于是这条断言测的是包索引,不是 flag。macOS runner 因此必红。 改成先问这台机器**自己**解析出什么(`Resolved <spec>`),再用那个 spec 走 `--toolchain`。 「压过 manifest 的 pin」那条仍然只在 Linux 上跑 —— 只有那里两个工具链都在。
1 parent 769fda8 commit 73e4429

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

tests/e2e/231_jobs_option.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,14 @@ echo "jobs option OK"
7171
#
7272
# Asserted by OBSERVING THE RESOLUTION, not by timing: a timing assertion on
7373
# CI measures the runner's mood.
74-
out=$("$MCPP" build --release --toolchain gcc@16.1.0 2>&1) \
75-
|| { echo "--toolchain gcc failed:"; echo "$out"; exit 1; }
76-
echo "$out" | grep -q 'Resolved gcc@16.1.0' \
74+
# The spec comes from THIS platform's own resolution, not a hard-coded
75+
# `gcc@16.1.0`: the fixture pins llvm on macOS and Windows, and asserting a
76+
# compiler that is not installed there tests the payload index, not the flag.
77+
own=$("$MCPP" build --release 2>&1 | sed -n 's/.*Resolved \([^ ]*\) .*/\1/p' | head -1)
78+
[ -n "$own" ] || { echo "could not learn this platform's toolchain"; exit 1; }
79+
out=$("$MCPP" build --release --toolchain "$own" 2>&1) \
80+
|| { echo "--toolchain $own failed:"; echo "$out"; exit 1; }
81+
echo "$out" | grep -q "Resolved $own" \
7782
|| { echo "--toolchain did not reach toolchain resolution:"; echo "$out"; exit 1; }
7883

7984
# ...and it must BEAT the manifest, or it is not an override. The fixture pins

0 commit comments

Comments
 (0)