// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // SPDX-License-Identifier: Apache-2.0 //! Host-process TCP fixtures for e2e tests. //! //! [`HostSupportContainer`](super::container::HostSupportContainer) publishes //! the same shape of fixture through a container engine. The VM host supervisor //! reaches these fixtures directly, and the VM e2e lane has no container //! runtime of its own, so this variant runs the fixture as a plain host process. use std::io::Read as _; use std::path::PathBuf; use std::process::{Child, Command, Stdio}; use std::time::Duration; use super::port::wait_for_port; /// A `python3` fixture listening on a host TCP port. /// /// Output is captured to a temp file rather than a pipe: these fixtures log /// every request they serve, and a full pipe buffer would block the process /// mid-test. [`logs`](Self::logs) reads the file, which is where a test finds /// its evidence (the CONNECT targets a proxy saw, for example). pub struct HostPythonFixture { /// Host port the fixture listens on. pub port: u16, child: Child, log_path: PathBuf, } impl HostPythonFixture { /// Start `python3 -c