diff --git a/crates/core/src/main.rs b/crates/core/src/main.rs index 39bc258..ae16388 100644 --- a/crates/core/src/main.rs +++ b/crates/core/src/main.rs @@ -255,26 +255,28 @@ where } stream::iter(tests.into_iter()) - .map(Ok::<_, anyhow::Error>) - .try_filter_map( + .filter_map( move |(metadata_file, case_idx, case, mode, reporter)| async move { let leader_compiler = ::new( args, mode.version.clone().map(Into::into), ) .await - .inspect_err(|err| error!(?err, "Failed to instantiate the leader compiler"))?; + .inspect_err(|err| error!(?err, "Failed to instantiate the leader compiler")) + .ok()?; + let follower_compiler = ::new( args, mode.version.clone().map(Into::into), ) .await - .inspect_err(|err| error!(?err, "Failed to instantiate the follower compiler"))?; + .inspect_err(|err| error!(?err, "Failed to instantiate the follower compiler")) + .ok()?; let leader_node = leader_node_pool.round_robbin(); let follower_node = follower_node_pool.round_robbin(); - Ok(Some(Test:: { + Some(Test:: { metadata: metadata_file, metadata_file_path: metadata_file.metadata_file_path.as_path(), mode: mode.clone(), @@ -285,10 +287,9 @@ where leader_compiler, follower_compiler, reporter, - })) + }) }, ) - .filter_map(|result| async move { result.ok() }) .filter_map(move |test| async move { match test.check_compatibility() { Ok(()) => Some(test), diff --git a/crates/report/src/aggregator.rs b/crates/report/src/aggregator.rs index 913b0d5..9b9670d 100644 --- a/crates/report/src/aggregator.rs +++ b/crates/report/src/aggregator.rs @@ -340,21 +340,13 @@ impl ReportAggregator { &mut self, event: PreLinkContractsCompilationFailedEvent, ) { - let include_input = self.report.config.report_include_compiler_input; - let execution_information = self.execution_information(&event.execution_specifier); - let compiler_input = if include_input { - event.compiler_input - } else { - None - }; - execution_information.pre_link_compilation_status = Some(CompilationStatus::Failure { reason: event.reason, compiler_version: event.compiler_version, compiler_path: event.compiler_path, - compiler_input, + compiler_input: event.compiler_input, }); } @@ -362,21 +354,13 @@ impl ReportAggregator { &mut self, event: PostLinkContractsCompilationFailedEvent, ) { - let include_input = self.report.config.report_include_compiler_input; - let execution_information = self.execution_information(&event.execution_specifier); - let compiler_input = if include_input { - event.compiler_input - } else { - None - }; - execution_information.post_link_compilation_status = Some(CompilationStatus::Failure { reason: event.reason, compiler_version: event.compiler_version, compiler_path: event.compiler_path, - compiler_input, + compiler_input: event.compiler_input, }); }