pub async fn run_and_collect_results(
    suite: fidl_fuchsia_test::SuiteProxy,
    sender: mpsc::Sender<TestEvent>,
    test_url: String,
) -> Result<(), anyhow::Error> {
    log::debug!("enumerating tests");
    let (case_iterator, server_end) = fidl::endpoints::create_proxy()?;
    suite.get_tests(server_end).map_err(|e| format_err!("Error getting test steps: {}", e))?;

    let mut invocations = Vec::<Invocation>::new();
    loop {
        let cases = case_iterator.get_next().await?;
        if cases.is_empty() {
            break;
        }
        for case in cases {
            invocations.push(Invocation { name: Some(case.name.unwrap()), tag: None });
        }
    }
    log::debug!("invocations: {:#?}", invocations);
    run_and_collect_results_for_invocations(suite, sender, test_url, invocations).await
}
/// Runs the test component using `suite` and collects logs and results.
Runs the test component using `suite` and collects logs and results.
Runs the test component using ` suite ` and collects logs and results .
pub async fn run_and_collect_results(
    suite: fidl_fuchsia_test::SuiteProxy,
    sender: mpsc::Sender<TestEvent>,
    test_url: String,
) -> Result<(), anyhow::Error> {
    log::debug!("enumerating tests");
    let (case_iterator, server_end) = fidl::endpoints::create_proxy()?;
    suite.get_tests(server_end).map_err(|e| format_err!("Error getting test steps: {}", e))?;
    let mut invocations = Vec::<Invocation>::new();
    loop {
        let cases = case_iterator.get_next().await?;
        if cases.is_empty() {
            break;
        }
        for case in cases {
            invocations.push(Invocation { name: Some(case.name.unwrap()), tag: None });
        }
    }
    log::debug!("invocations: {:#?}", invocations);
    run_and_collect_results_for_invocations(suite, sender, test_url, invocations).await
}
pub async fn run_and_collect_results ( suite : fidl_fuchsia_test :: SuiteProxy , sender : mpsc :: Sender < TestEvent > , test_url : String , ) -> Result < ( ) , anyhow :: Error > { log :: debug ! ( " " ) ; let ( case_iterator , server_end ) = fidl :: endpoints :: create_proxy ( ) ? ; suite . get_tests ( server_end ) . map_err ( | e | format_err ! ( " " e ) ) ? ; let mut invocations = Vec :: < Invocation > :: new ( ) ; loop { let cases = case_iterator . get_next ( ) . await ? ; if cases . is_empty ( ) { break ; } for case in cases { invocations . push ( Invocation { name : Some ( case . name . unwrap ( ) ) , tag : None } ) ; } } log :: debug ! ( " " invocations ) ; run_and_collect_results_for_invocations ( suite , sender , test_url , invocations ) . await }
Runs the test component using `suite` and collects logs and results.
Runs the test component using ` suite ` and collects logs and results .
suite
fidl_fuchsia_test::SuiteProxy
sender
mpsc::Sender<TestEvent>
test_url
String
suite
fidl_fuchsia_test::SuiteProxy
sender
mpsc::Sender<TestEvent>
test_url
String