Repository navigation
fix(cli): keep inspect's expected errors out of the artifact dir - #611
Merged
Merged
Conversation
inspect takes the library's Eof and Timeout as outcomes, and the library records every error that carries a screen in TERMLENS_ARTIFACT_DIR, so a normal run left a failure screen there. The CLI and the inspect example take the variable out of their own environment before any thread exists, and hand it to the program when it inherits the environment. The library documents that an expected error is recorded too (#596). Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
Resolves the CHANGELOG conflict with #610: both sets of entries kept. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
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.
termlens inspectuses the library's errors as outcomes —Eoffor a program that exits without painting,Timeoutfor one still running at the deadline — and the library writes every screen-carrying error toTERMLENS_ARTIFACT_DIR. Soinspect true(exit 0) leftmain-1.screen.jsonthere, which the report action then lists under "screens from the failing tests".Fix. The CLI and the
inspectexample take the variable out of their own environment at the top ofinspect, before any thread exists (edition 2021, soremove_varis safe there), and hand it explicitly to the program when it runs with--inherit-env, so a program that wants it still sees it.Library half. As the issue says, a per-wait opt-out needs a design decision first; this documents the behaviour instead:
Error'sTERMLENS_ARTIFACT_DIRsection now says an expected timeout or EOF is recorded too, so the variable belongs on the steps whose failures you want to see.Test.
inspect trueand a program still running at--timeout 1leave the directory empty, and a--inherit-envprogram sees the variable. With theremove_varline removed the test fails with exactly the issue's["main-1.screen.json"].Closes #596