Skip to content

Commit 814da41

Browse files
committed
fix(e2e): 101 — assert stdlib gate consistency instead of hardcoding libc++ (clang+MSVC STL on windows); .exe-aware binary find
1 parent 8a673f4 commit 814da41

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

tests/e2e/101_cppfly_llvm_soft.sh

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,29 @@ grep -qE '^cxxflags = -std=c\+\+2c' "$build_ninja" || {
5959
exit 1
6060
}
6161

62-
# xim llvm payloads use libc++ → the stdlib experimental gate applies.
63-
grep -q 'experimental-library (-fexperimental-library)' "$TMP/build.log" || {
64-
cat "$TMP/build.log"
65-
echo "FAIL: summary missing libc++ experimental-library gate"
66-
exit 1
67-
}
68-
grep -q -- '-fexperimental-library' "$build_ninja" || {
69-
echo "FAIL: build.ninja missing -fexperimental-library"
70-
exit 1
71-
}
62+
# stdlib gate: libc++ (linux/macos llvm payloads) → enabled + flag present;
63+
# clang on MSVC STL (windows) → reported skipped + flag absent. Assert the
64+
# summary and the emitted flags AGREE rather than hardcoding one stdlib.
65+
if grep -q 'experimental-library (-fexperimental-library)' "$TMP/build.log"; then
66+
grep -q -- '-fexperimental-library' "$build_ninja" || {
67+
echo "FAIL: summary claims experimental-library but build.ninja lacks the flag"
68+
exit 1
69+
}
70+
else
71+
grep -q 'skipped: .*experimental-library' "$TMP/build.log" || {
72+
cat "$TMP/build.log"
73+
echo "FAIL: experimental-library neither enabled nor reported skipped"
74+
exit 1
75+
}
76+
if grep -q -- '-fexperimental-library' "$build_ninja"; then
77+
echo "FAIL: -fexperimental-library emitted for a non-libc++ stdlib"
78+
exit 1
79+
fi
80+
fi
7281

73-
binary=$(find target -type f -path '*/bin/flysoft' | head -1)
82+
binary=$(find target -type f \( -path '*/bin/flysoft' -o -path '*/bin/flysoft.exe' \) | head -1)
7483
out=$("$binary")
75-
[[ "$out" == "fly soft ok" ]] || {
84+
[[ "$out" == *"fly soft ok"* ]] || {
7685
echo "FAIL: runtime output: $out"
7786
exit 1
7887
}

0 commit comments

Comments
 (0)