@@ -2,7 +2,7 @@ use std::{path::Path, str::FromStr, time::Instant};
22
33use anyhow:: Result ;
44use serde:: Deserialize ;
5- use tracing:: { event, Level } ;
5+ use tracing:: { error , event, Level } ;
66
77use super :: { external_cmd:: run_command, resmoke_suite:: ResmokeSuiteConfig } ;
88
@@ -95,8 +95,17 @@ impl TestDiscovery for ResmokeProxy {
9595 "Resmoke test discovery finished"
9696 ) ;
9797
98- let output: TestDiscoveryOutput = serde_yaml:: from_str ( & cmd_output) ?;
99- Ok ( output
98+ let output: Result < TestDiscoveryOutput , serde_yaml:: Error > =
99+ serde_yaml:: from_str ( & cmd_output) ;
100+ if output. is_err ( ) {
101+ error ! (
102+ command = cmd. join( " " ) ,
103+ command_output = & cmd_output,
104+ "Failed to parse yaml from discover tests command output" ,
105+ ) ;
106+ }
107+
108+ Ok ( output?
100109 . tests
101110 . into_iter ( )
102111 . filter ( |f| Path :: new ( f) . exists ( ) )
@@ -150,7 +159,16 @@ impl MultiversionConfig {
150159 cmd. append ( & mut script. iter ( ) . map ( |s| s. as_str ( ) ) . collect ( ) ) ;
151160 cmd. append ( & mut vec ! [ "multiversion-config" ] ) ;
152161 let cmd_output = run_command ( & cmd) . unwrap ( ) ;
153- Ok ( serde_yaml:: from_str ( & cmd_output) ?)
162+ let multiversion_config: Result < MultiversionConfig , serde_yaml:: Error > =
163+ serde_yaml:: from_str ( & cmd_output) ;
164+ if multiversion_config. is_err ( ) {
165+ error ! (
166+ command = cmd. join( " " ) ,
167+ command_output = & cmd_output,
168+ "Failed to parse yaml from multiversion config command output" ,
169+ ) ;
170+ }
171+ Ok ( multiversion_config?)
154172 }
155173
156174 /// Get the required FCV tag for the lts version.
0 commit comments