scripts: bun run test:tui draws the lanes of test:all live, on packages/tui - #409
Merged
Merged
Conversation
…nterface, and test-all.mjs is its plain front end, printing what it printed
…s/tui and ends with the plain runner's failing output and exit code
… it as the framework in daily use
… process group each put itself in
…rt with … on a terminal too narrow for it
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.
A live front end for the repo's own test run, built on
packages/tui— the framework in daily use.bun run test:allis unchanged.Shared lanes.
scripts/lanes.mjsplans, runs and reads the lanes behind one event interface (plan,start,chunk,finish,end);scripts/test-all.mjsis its plain front end and prints what it printed:--planpinned byte for byte, plain and painted, and 14 fixture runs (green, red, painted, skip, CI skip, timeout, bad flags, …) matching the original's stdout, stderr and exit code with timings masked. An aborted run kills every process under its lanes, whatever group each put itself in (bun test --parallelworkers lead their own), pinned intest/spawn/cli/test-all.test.js.bun run test:tui(scripts/test-live.rip): a header with a ticking clock; a strip of one cell per lane (waiting, running, passed, failed, skipped); an overall bar at eighth-block precision with an ETA weighted by each lane's last duration; a row per lane in flight with its own spinner and a bar that fills against its last run — by test count where the lane streams one line per test, else by time — graded cyan to green, amber past its usual time and red past double; finished lanes scrolling into the scrollback as aligned rows with a duration bar and the change from last run; a red failure card with the test, expected and received, andfile:lineas a link, ↑↓ between cards, Enter for the lane's full output,ffor failures only; the terminal's own progress indicator; at the end, every failing lane's output exactly as the plain runner prints it, a summary card (totals, wall time against last run, the parallelism, the slowest lanes, a verdict), and the plain runner's exit code..rip/test-last.json(ignored) keeps the last run's durations and counts. Piped, underCI, or with--plan, it runs the plain runner.It costs about 0.5 ms of CPU a frame at one frame per 100 ms tick; end to end under a real pty, 67.2–69.5 s against the plain runner's 67.7–70.1 s.
Tests:
packages/tui/test/live.rip(14, headless throughmount, the lane events fed by hand), the--planbyte pin and the process-tree abort.bun run test:all: 29 lanes, 12,691 tests.