Repository navigation
test(pty): say which bootstrap step failed and what the shell printed (refs #58) - #60
Merged
Merged
Conversation
… (refs #58) PtySession::spawn returned None, so a bootstrap failure on CI could not tell a slow shell from a broken one.
At 5 s it kept a PTY busy while the shell tests in the same binary were starting their shells.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #58. This is the first step there: the next bootstrap failure on CI will show its cause. The issue stays open until that output decides the fix.
What a failed PTY test prints now
PtySession::spawnreturns aBootstrapErrorinstead ofNone. The.expect(..)in every PTY test prints it, so a failure names the bootstrap line that was sent, the cause (Timeout(5s), a read or write error, or a failedrunex export nu), the time since the shell was launched, and the last 4 KiB the shell printed since launch. The output is kept raw with its escape sequences, because an unanswered cursor-position query (ESC[6n) is one of the things it has to show.When it shows
Only when a bootstrap step fails. The keystroke checks after bootstrap still use
Option, so a failedexpect_regexreads as before.