File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
crates/cargo-codspeed/src Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use codspeed::walltime::get_raw_result_dir_from_workspace_root;
1111use glob:: glob;
1212use std:: {
1313 io:: { self , Write } ,
14+ os:: unix:: process:: ExitStatusExt ,
1415 path:: { Path , PathBuf } ,
1516} ;
1617
@@ -157,10 +158,16 @@ pub fn run_benches(
157158 if status. success ( ) {
158159 Ok ( ( ) )
159160 } else {
160- Err ( anyhow ! (
161+ let code = status
162+ . code ( )
163+ . or ( status. signal ( ) . map ( |s| 128 + s) ) // 128+N indicates that a command was interrupted by signal N (see: https://tldp.org/LDP/abs/html/exitcodes.html)
164+ . unwrap_or ( 1 ) ;
165+
166+ eprintln ! (
161167 "failed to execute the benchmark process, exit code: {}" ,
162- status. code( ) . unwrap_or( 1 )
163- ) )
168+ code
169+ ) ;
170+ std:: process:: exit ( code) ;
164171 }
165172 } ) ?;
166173 eprintln ! ( "Done running {}" , bench_name) ;
You can’t perform that action at this time.
0 commit comments