File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,22 @@ pub(crate) fn runner(args: RunnerArgs) -> Result<i32, ErrorMessage> {
72
72
. map_err ( |e| format ! ( "Failed to wait for QEMU process: {}" , e) ) ?;
73
73
return Err ( ErrorMessage :: from ( "Timed Out" ) ) ;
74
74
}
75
- Some ( exit_status) => match config. test_success_exit_code {
76
- Some ( code) if exit_status. code ( ) == Some ( code) => 0 ,
77
- other => other. unwrap_or ( 1 ) ,
78
- } ,
75
+ Some ( exit_status) => {
76
+ #[ cfg( unix) ]
77
+ {
78
+ if exit_status. code ( ) . is_none ( ) {
79
+ use std:: os:: unix:: process:: ExitStatusExt ;
80
+ if let Some ( signal) = exit_status. signal ( ) {
81
+ eprintln ! ( "QEMU process was terminated by signal {}" , signal) ;
82
+ }
83
+ }
84
+ }
85
+ let qemu_exit_code = exit_status. code ( ) . ok_or ( "Failed to read QEMU exit code" ) ?;
86
+ match config. test_success_exit_code {
87
+ Some ( code) if qemu_exit_code == code => 0 ,
88
+ _ => qemu_exit_code,
89
+ }
90
+ }
79
91
}
80
92
} else {
81
93
let status = command
You can’t perform that action at this time.
0 commit comments