pub struct TestProcesses { /* private fields */ }Expand description
Owns all child processes spawned for a single simulation run and accumulates their stdout output for later inspection.
All child processes are killed when this value is dropped.
Implementations§
Source§impl TestProcesses
impl TestProcesses
Sourcepub fn search_stdout_for_strings(&mut self, expected: HashSet<&str>)
pub fn search_stdout_for_strings(&mut self, expected: HashSet<&str>)
Block until every string in expected appears as a substring of any
accumulated stdout line, or panic after 30 seconds listing missing strings.
Sourcepub fn search_stdout_with_timeout(
&mut self,
expected: HashSet<&str>,
timeout: Duration,
)
pub fn search_stdout_with_timeout( &mut self, expected: HashSet<&str>, timeout: Duration, )
Like [search_stdout_for_strings] but with a caller-supplied timeout.
Useful in tests to avoid 30-second waits.
Sourcepub fn debug_dump_stdout(&mut self, timeout: Duration)
pub fn debug_dump_stdout(&mut self, timeout: Duration)
Helper method to dump the current stdout from attached nrf-rpc-server. Useful when debugging, but will result in search stdout methods no longer functioning (as this will consume stdout).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestProcesses
impl RefUnwindSafe for TestProcesses
impl Send for TestProcesses
impl Sync for TestProcesses
impl Unpin for TestProcesses
impl UnsafeUnpin for TestProcesses
impl UnwindSafe for TestProcesses
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more