Mercurial > crates > systemd-socket
view tests/ordinary.rs @ 29:efc69e99db70
Set socket to nonblocking before passing it to tokio.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sat, 19 Apr 2025 01:41:25 -0400 |
parents | cfef4593e207 |
children |
line wrap: on
line source
use std::ffi::OsStr; use std::io; use std::process::{Child, Command}; mod comm; enum Test {} impl comm::Test for Test { const SOCKET_ADDR: &'static str = "localhost:4242"; fn spawn_slave(program_name: &OsStr) -> io::Result<Child> { Command::new(program_name) .env("SYSTEMD_SOCKET_INTEGRATION_TEST", "slave") .spawn() } } #[test] fn main() { comm::main::<Test>(); }