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§

source

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.

source

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.

source

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§

source

fn get_parallel_count(parallel: u16) -> usize

source

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.

Implementors§