Skip to content

Commit f4e646d

Browse files
committed
test(645): the machine-default leg takes the newest other installed version
The first other version found was gcc 13.3.0, which rejects -fmodules, so the leg measured the compiler rather than the fast path. Measured after the change: build A-B-A, run A-B-A, and gcc@16.1.0 -> gcc@15.1.0 with the artefact's version string, all passing.
1 parent d5b2aed commit f4e646d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/e2e/645_the_fast_path_compares_the_toolchain_request.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ family=${own%@*}
7878
own_version=${own#*@}
7979
export MCPP_HOME="$TMP/home"
8080
source "$HERE/_inherit_toolchain.sh"
81+
# The newest other version first: an old one may predate the module support
82+
# the build needs (gcc 13 rejects -fmodules), which would test the compiler
83+
# rather than the fast path.
8184
other=""
82-
for dir in "$MCPP_HOME/registry/data/xpkgs/xim-x-$family"/*; do
83-
[ -d "$dir" ] || continue
84-
v=$(basename "$dir")
85+
for v in $(ls "$MCPP_HOME/registry/data/xpkgs/xim-x-$family" 2>/dev/null | sort -V -r); do
86+
dir="$MCPP_HOME/registry/data/xpkgs/xim-x-$family/$v"
8587
[ "$v" != "$own_version" ] && [ -x "$dir/bin/g++" -o -x "$dir/bin/clang++" -o -x "$dir/bin/clang++.exe" ] \
8688
&& { other="$family@$v"; break; }
8789
done

0 commit comments

Comments
 (0)