1067 |
|
|
1068 |
proc check_for_board_status { variable } { |
proc check_for_board_status { variable } { |
1069 |
upvar $variable output; |
upvar $variable output; |
1070 |
|
|
1071 |
# If all programs of this board have a wrapper that always outputs a |
# If all programs of this board have a wrapper that always outputs a |
1072 |
# status message, then the absence of it means that the program |
# status message, then the absence of it means that the program |
1073 |
# crashed, regardless of status found elsewhere (e.g. simulator exit |
# crashed, regardless of status found elsewhere (e.g. simulator exit |
1074 |
# code). |
# code). |
1075 |
if { [target_info needs_status_wrapper] != "" } then { |
if { [target_info needs_status_wrapper] != "" } then { |
1076 |
set nomatch_return 2 |
set nomatch_return 2 |
1077 |
} else { |
} else { |
1078 |
set nomatch_return -1 |
set nomatch_return -1 |
1079 |
} |
} |
1080 |
|
|
1081 |
if [regexp "(^|\[\r\n\])\\*\\*\\* EXIT code" $output] { |
if [regexp "(^|\[\r\n\])\\*\\*\\* EXIT code" $output] { |
1082 |
regsub "^.*\\*\\*\\* EXIT code " $output "" result; |
regsub "^.*\\*\\*\\* EXIT code " $output "" result; |
1087 |
verbose "got board status $result" 3 |
verbose "got board status $result" 3 |
1088 |
verbose "output is $output" 3 |
verbose "output is $output" 3 |
1089 |
if { $result == "" } { |
if { $result == "" } { |
1090 |
return $nomatch_return; |
return $nomatch_return |
1091 |
} else { |
} else { |
1092 |
return [expr $result]; |
return [expr $result] |
1093 |
} |
} |
1094 |
} else { |
} else { |
1095 |
return $nomatch_return; |
return $nomatch_return; |