exec: move line capture out of context

The line sink, stream and pump are not context concerns: the host runner
and every sandbox backend feed the same cleaned lines to the terminal.
Move them and the fd sanitizer to exec, and have LocalDriver delegate to
the shared host runner.

Add a run_captured test against sh to pin the two-stream contract before
the sandbox backends move.
This commit is contained in:
vhaudiquet committed 2026-11-24 18:35:17 +01:00
1 parent bf88ce4f4d
commit 48306f3719
18 files changed
+326 -271

No files matched your search

+3 -2
View File
@@ -40,7 +40,7 @@ mod imp {
false
}
pub(crate) fn subprocess_sink() -> Option<std::sync::Arc<dyn crate::context::LineSink>> {
pub(crate) fn subprocess_sink() -> Option<std::sync::Arc<dyn crate::exec::LineSink>> {
None
}
@@ -78,7 +78,8 @@ mod imp {
use std::process::{Command, ExitStatus};
use std::sync::{Arc, Mutex, OnceLock};
use crate::context::{ContextDriver, LineSink, Stream};
use crate::context::ContextDriver;
use crate::exec::{LineSink, Stream};
/// Directory receiving one log file per test
fn log_dir() -> PathBuf {