Mercurial > crates > systemd-socket
view tests/ordinary.rs @ 32:ff3bd73afdd4 default tip
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 | 66c0e10c89fc |
children | cfef4593e207 |
line wrap: on
line source
use std::io; use std::ffi::OsStr; use std::process::{Command, Child}; 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>(); }