Skip to main content

TestProcesses

Struct TestProcesses 

Source
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

Source

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.

Source

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.

Source

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).

Source

pub fn kill_all(&mut self)

Kill all managed child processes immediately. Called automatically on drop.

Trait Implementations§

Source§

impl Drop for TestProcesses

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.