pub trait StateData {
    fn start(&mut self) -> Result<Option<TestState>, RunError>;
    fn init(&mut self) -> Result<TestState, RunError>;
    fn wait(&mut self) -> Result<Option<TestState>, RunError>;
    fn last_wait_attempt(&mut self) -> Result<Option<TestState>, RunError>;
    fn stop(&mut self) -> Result<TestState, RunError>;
}
Expand description

Tracing a process on an OS will have platform specific code. Structs containing the platform specific datastructures should provide this trait with an implementation of the handling of the given states.

Required Methods

Starts the tracing. Returns None while waiting for start. Statemachine then checks timeout

Initialises test for tracing returns next state

Waits for notification from test executable that there’s something to do. Selects the next appropriate state if there’s something to do otherwise None

This is here for the times when we’re about to mark the attempted coverage collection as a failure i.e. timeout, but there’s an alternative to that which can see if we’re actually in a “finished” state but are still waiting on resource cleanup so we don’t lose the results.

Handle a stop in the test executable. Coverage data will be collected here as well as other OS specific functions

Trait Implementations

Starts the tracing. Returns None while waiting for start. Statemachine then checks timeout Read more

Initialises test for tracing returns next state

Waits for notification from test executable that there’s something to do. Selects the next appropriate state if there’s something to do otherwise None Read more

This is here for the times when we’re about to mark the attempted coverage collection as a failure i.e. timeout, but there’s an alternative to that which can see if we’re actually in a “finished” state but are still waiting on resource cleanup so we don’t lose the results. Read more

Handle a stop in the test executable. Coverage data will be collected here as well as other OS specific functions Read more

Implementations on Foreign Types

Implementors