Skip to content

Commit 3d104ca

Browse files
committed
fix(e2e): 256 looked for env=, and the emitted spelling is env = "msvc"
The tar fix landed — both legs packed and the archive was written, which is what that test exists to show: `mathkit.lib` beside `libmathkit.a` in one Windows package. What failed after it was the predicate assertion, against a package that was perfectly correct: the generated manifest writes [target.'cfg(all(arch = "x86_64", os = "windows", env = "msvc"))'.build] and the grep looked for `env=`, which appears nowhere in the file. Matched with optional whitespace now. A grep that can only fail is worth more attention than one that passes, because it reads as a product bug on the one platform where nothing else could confirm it. Audited the other emitted-manifest assertions in the suite for the same shape; the rest either allow spacing (`role *= *`) or match structural text.
1 parent 074661f commit 3d104ca

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/e2e/256_pack_library_fat_windows.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ grep -qE "^\[target\.'$ARCH-" "$pkg/mcpp.toml" && {
9090
cat "$pkg/mcpp.toml"
9191
echo "FAIL: a leg is selected by a BARE TRIPLE, which is inert on a native build"
9292
exit 1; }
93-
# env= must appear: `os=windows` alone cannot separate these two legs, and a
94-
# predicate that cannot separate them would hand MSVC consumers the MinGW archive.
95-
grep -q "env=" "$pkg/mcpp.toml" || {
93+
# An env axis must appear: `os = "windows"` alone cannot separate these two legs,
94+
# and a predicate that cannot separate them would hand MSVC consumers the MinGW
95+
# archive. Matched with optional spaces — the emitted spelling is `env = "msvc"`,
96+
# and the first version of this grep looked for `env=`, which is nowhere in the
97+
# file and failed against a package that was perfectly correct.
98+
grep -qE 'env[[:space:]]*=' "$pkg/mcpp.toml" || {
9699
cat "$pkg/mcpp.toml"
97100
echo "FAIL: the predicates carry no env axis, so both legs match both targets"
98101
exit 1; }

0 commit comments

Comments
 (0)