mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 11:27:29 +00:00
tool: test result output of amtterm reset
"amtterm reset" returns 0 as exitcode even if the reset command failed. So check explicitly the output of the command to detect the error case.
This commit is contained in:
parent
f5be746894
commit
e7f3e99aab
10
tool/run
10
tool/run
@ -595,6 +595,7 @@ proc spawn_amt { wait_for_re timeout_value } {
|
||||
set exit_result 1
|
||||
|
||||
while { $exit_result != 0 } {
|
||||
set try_again 0
|
||||
set time_start [ clock seconds ]
|
||||
spawn amttool $::env(AMT_TEST_MACHINE_IP) reset
|
||||
expect {
|
||||
@ -602,6 +603,11 @@ proc spawn_amt { wait_for_re timeout_value } {
|
||||
eof { puts "Error: amttool died unexpectedly"; exit -4 }
|
||||
timeout { puts "Error: amttool timed out"; exit -5 }
|
||||
}
|
||||
expect {
|
||||
"result: pt_status: success" { break }
|
||||
eof { set try_again 1 }
|
||||
timeout { puts "Error: amttool timed out"; exit -6 }
|
||||
}
|
||||
catch wait result
|
||||
set time_end [ clock seconds ]
|
||||
if {[expr $time_end - $time_start] <= 1} {
|
||||
@ -612,6 +618,10 @@ proc spawn_amt { wait_for_re timeout_value } {
|
||||
if {$timeout < 0} {
|
||||
set timeout 0
|
||||
}
|
||||
if {$try_again != 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
set exit_result [lindex $result 3]
|
||||
}
|
||||
sleep 5
|
||||
|
Loading…
x
Reference in New Issue
Block a user