Commit graph

7 commits

Author SHA1 Message Date
Andreas Kling
ac8887e34d Tests: Preserve LibWeb harness diagnostics on early exits
Keep a small harness-status.txt file in the test-web results
directory and refresh it whenever tests start, finish, or the run stops
early. This leaves the last known active views, counts, and remaining
test count behind even if the harness does not reach its normal result
generation path.

Also report helper-process log write failures instead of treating them
as "no logs". That makes artifact gaps visible instead of silently
losing the only clue from a helper process failure.
2026-05-13 13:32:49 +02:00
Andreas Kling
774407f0ed test-web: Route helper process exit log through the captured output
The exit-status line added in b71d82645b was being written with outln()
straight to stdout, which corrupts the live progress bar that the
default display renders on stdout during a run.

Send it through log_helper_message() instead, attributed to the exiting
process. That way the line lands at the tail of that pid's section in
helper-process-logs.html, only tees to the terminal when verbosity is
raised to VERBOSITY_LEVEL_LOG_TEST_OUTPUT, and stays out of the way of
the progress display in normal runs. Drain the helper's pending output
via consume_helper_capture() first so the exit message appears after
the process's final output rather than before it.
2026-05-13 00:50:58 +02:00
Andreas Kling
b71d82645b test-web: Log why the test runner exits early
Log active views and tests when test-web stops before all tests have
completed. Reuse the same reporting for signal handling, and accept any
future signal registration without asserting while explaining shutdown.

Also log observed helper process exits with decoded Unix wait status so
CI logs show whether a process exited normally or died from a signal.
2026-05-12 20:57:08 +02:00
Andreas Kling
a031d00695 WebContent: Exit cleanly when browser IPC disconnects
Exit WebContent immediately when either browser-side IPC peer
disconnects. Plumb Unix process exit status through LibWebView so the
browser process can tell clean owner-driven shutdown apart from renderer
crashes.

This keeps nonzero exits and signal deaths reported as crashes, while
letting status 0 exits disappear without making test-web report the page
as crashed.
2026-05-12 20:57:08 +02:00
Jonathan Gamble
736ee40db0 test-web: Dont leak captured fds when a helper process dies 2026-04-21 20:01:41 +02:00
Jonathan Gamble
1af74d1a7c test-web: Capture all browser and helper process output
This prevents glitches where stale test status lines can bleed above
the live display list. Log this additional captured output so it can
be reviewed if a main or helper process failure is suspected.
2026-04-15 17:09:50 +02:00
Jonathan Gamble
be7266326c test-web: Consolidate output capture handling
Use files instead of buffers. Consolidate stderr and stdout into one
view. Break handling out into TestRunCapture and CaptureFile helper
classes. We will use them to log output from ALL processes in the next
commit.
2026-04-15 17:09:50 +02:00