Skip to content

test(e2e): 239 could pass or skip, never fail - #438

Closed
Sunrisepeak wants to merge 1 commit into
mainfrom
fix/e2e-239-could-not-fail
Closed

test(e2e): 239 could pass or skip, never fail#438
Sunrisepeak wants to merge 1 commit into
mainfrom
fix/e2e-239-could-not-fail

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

The skip was decided after the install, by pattern-matching the failure text, and one of the patterns was *"index"*. Nearly every mcpp command prints "package index" somewhere, so every genuine install failure took the skip branch.

It hid a real one, on the first Windows run where the package was actually installable:

tar: Cannot connect to C: resolve failed
tar -xf "C:\Users\...\.payloads\Microsoft.VC...vsix" -C "..."
[error] msvc installed but registered none of the programs it declares

The install ran for 135 seconds, failed, and this script printed PASS.

Fix

Skip is decided before the work, by a positive check for the thing whose absence would make the test impossible (no msvc row in toolchain list). Everything after that is a failure, and the output is printed rather than folded into a one-line message.

A skip decided by the shape of a failure is not a skip; it is a way of not looking.

The recipe-side fix for what it hid is openxlings/xim-pkgindex#632 (GNU tar reads C: as a hostname; bsdtar does not, which is why the index's own windows-test passed).

Test plan

  • bash -n clean
  • ci-windows-e2e — 239 now either runs for real or skips for a stated, checkable reason

The skip was decided AFTER the install by pattern-matching the failure text,
and one of the patterns was `*"index"*`. Nearly every mcpp command prints
"package index" somewhere, so EVERY genuine install failure took the skip
branch.

It hid a real one, on the first Windows run where the package was actually
installable:

    tar: Cannot connect to C: resolve failed
    tar -xf "C:\Users\...\.payloads\Microsoft.VC...vsix" -C "..."
    [error] msvc installed but registered none of the programs it declares

GNU tar reads `C:` as a hostname. The install ran for 135 seconds, failed,
and this script printed PASS.

Skip is now decided BEFORE the work, by a positive check for what would make
the test impossible (no msvc row in `toolchain list`). Everything after that
is a failure, and the output is printed rather than folded into a one-line
message.

The recipe-side fix is openxlings/xim-pkgindex#632.

A skip decided by the shape of a failure is not a skip; it is a way of not
looking.
@Sunrisepeak

Copy link
Copy Markdown
Member Author

Folded into #440 and closing there.

#440 has to re-run its Windows e2e anyway (it was blocked on openxlings/xim-pkgindex#637 / #639), so carrying this as a separate PR would have cost a second full CI cycle for a change to the same file — #440 already touches 239_msvc_managed_toolset.sh.

The commit is preserved verbatim, plus two follow-ups that today's run argued for:

  • the skip asks for $TOOLSET, not the family. Grepping for "msvc" is true during an index publish window — the family is listed, this version is not yet — and now that a failure is hard, that would report a timing artifact as a defect.
  • the install must report a Windows SDK. install prints windows sdk: <version> (<root>), but the script discarded its output on success. That is exactly why a half-installed SDK said nothing here and surfaced ~100 lines later as LNK1104: cannot open file 'kernel32.lib' with no line naming the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants