@@ -2,7 +2,7 @@ use std::{path::Path, str::FromStr, time::Instant};
2
2
3
3
use anyhow:: Result ;
4
4
use serde:: Deserialize ;
5
- use tracing:: { event, Level } ;
5
+ use tracing:: { error , event, Level } ;
6
6
7
7
use super :: { external_cmd:: run_command, resmoke_suite:: ResmokeSuiteConfig } ;
8
8
@@ -95,8 +95,17 @@ impl TestDiscovery for ResmokeProxy {
95
95
"Resmoke test discovery finished"
96
96
) ;
97
97
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?
100
109
. tests
101
110
. into_iter ( )
102
111
. filter ( |f| Path :: new ( f) . exists ( ) )
@@ -150,7 +159,16 @@ impl MultiversionConfig {
150
159
cmd. append ( & mut script. iter ( ) . map ( |s| s. as_str ( ) ) . collect ( ) ) ;
151
160
cmd. append ( & mut vec ! [ "multiversion-config" ] ) ;
152
161
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?)
154
172
}
155
173
156
174
/// Get the required FCV tag for the lts version.
0 commit comments