Interactive serial module#282
Open
llogen wants to merge 4 commits into
Open
Conversation
9f7f3e0 to
87a4da9
Compare
e1567e2 to
af2dd18
Compare
176f7c1 to
02f20d0
Compare
02f20d0 to
a68f4a1
Compare
8de5449 to
8db5226
Compare
8db5226 to
d43b406
Compare
The serial module gains three modes - interactive pass-through, expect (wait for a regex then exit) and expect-send pairs that auto-reply to prompts - and strips non-SGR terminal sequences from DUT output so they cannot corrupt the client terminal. If the serial device disappears mid-session (e.g. an FTDI chip that powers down with the DUT) it waits for the device to reappear and reconnects automatically. (#119) Signed-off-by: llogen <christoph.lange@blindspot.software>
The agent now closes the module stdin channel during session teardown, so a module blocked reading client input (such as the serial console) unblocks via EOF and the command returns instead of hanging. Signed-off-by: llogen <christoph.lange@blindspot.software>
The client now switches the terminal to raw mode during a run and forwards every keystroke - including Ctrl-C, Ctrl-D and Ctrl-Z - straight to the DUT. Press Ctrl-A then x to quit the session. Raw mode is build-tagged for Linux and macOS, with a no-op fallback on other platforms so the client still builds everywhere. (#121) Signed-off-by: llogen <christoph.lange@blindspot.software>
The serial module accepts tagged expect:/send: arguments, so an automation can send input before expecting, or interleave sends and expects in any order — not just strict expect-send pairs. Signed-off-by: llogen <christoph.lange@blindspot.software>
d43b406 to
fafae49
Compare
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.
Bidirectional serial console to the DUT. Resolves #121 and #119.
Client: raw terminal mode — keystrokes (incl. Ctrl-C/D/Z) stream live to
the DUT; quit with
Ctrl-A x. Builds on Linux/macOS/Windows.Module: three modes — interactive, expect (wait for regex), and
expect-send (auto-reply to prompts). Strips non-SGR escape sequences from
output. Auto-reconnects if the serial device drops mid-session (#119).
Agent: closes module stdin on teardown so sessions end cleanly.