Trait test_runners_lib::elf::SuiteServer
source · pub trait SuiteServer: Sized + Sync + Send {
// Required methods
fn run(
self,
component: Weak<Component>,
test_url: &str,
stream: SuiteRequestStream
) -> AbortHandle;
fn enumerate_tests<'life0, 'async_trait>(
&'life0 self,
test_component: Arc<Component>
) -> Pin<Box<dyn Future<Output = Result<EnumeratedTestCases, EnumerationError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn run_tests<'life0, 'life1, 'async_trait>(
&'life0 self,
invocations: Vec<Invocation>,
run_options: RunOptions,
test_component: Arc<Component>,
run_listener: &'life1 RunListenerProxy
) -> Pin<Box<dyn Future<Output = Result<(), RunTestError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn get_parallel_count(parallel: u16) -> usize { ... }
fn serve_test_suite<'async_trait>(
self,
stream: SuiteRequestStream,
component: Weak<Component>
) -> Pin<Box<dyn Future<Output = Result<(), SuiteServerError>> + Send + 'async_trait>>
where Self: 'async_trait { ... }
}
Expand description
Describes a test suite server for tests that are executed as ELF components.
Required Methods§
sourcefn run(
self,
component: Weak<Component>,
test_url: &str,
stream: SuiteRequestStream
) -> AbortHandle
fn run( self, component: Weak<Component>, test_url: &str, stream: SuiteRequestStream ) -> AbortHandle
Run this server.
component
: Test component instance.test_url
: URL of test component.stream
: Stream to serve Suite protocol on.
Returns abortable handle for suite server future.
sourcefn enumerate_tests<'life0, 'async_trait>(
&'life0 self,
test_component: Arc<Component>
) -> Pin<Box<dyn Future<Output = Result<EnumeratedTestCases, EnumerationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enumerate_tests<'life0, 'async_trait>( &'life0 self, test_component: Arc<Component> ) -> Pin<Box<dyn Future<Output = Result<EnumeratedTestCases, EnumerationError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Retrieves test information from the test binary.
A cached list of test cases should be returned by cloning a
SharedFuture<EnumeratedTestCases, EnumerationError>
that is stored in the suite server
struct.
sourcefn run_tests<'life0, 'life1, 'async_trait>(
&'life0 self,
invocations: Vec<Invocation>,
run_options: RunOptions,
test_component: Arc<Component>,
run_listener: &'life1 RunListenerProxy
) -> Pin<Box<dyn Future<Output = Result<(), RunTestError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_tests<'life0, 'life1, 'async_trait>( &'life0 self, invocations: Vec<Invocation>, run_options: RunOptions, test_component: Arc<Component>, run_listener: &'life1 RunListenerProxy ) -> Pin<Box<dyn Future<Output = Result<(), RunTestError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Runs requested tests and sends test events to the given listener.
Provided Methods§
fn get_parallel_count(parallel: u16) -> usize
sourcefn serve_test_suite<'async_trait>(
self,
stream: SuiteRequestStream,
component: Weak<Component>
) -> Pin<Box<dyn Future<Output = Result<(), SuiteServerError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn serve_test_suite<'async_trait>( self, stream: SuiteRequestStream, component: Weak<Component> ) -> Pin<Box<dyn Future<Output = Result<(), SuiteServerError>> + Send + 'async_trait>>where Self: 'async_trait,
Implements fuchsia.test.Suite
service and runs test.
Object Safety§
This trait is not object safe.