run: add error checking to power on step

This commit is contained in:
Josef Söntgen 2017-08-07 16:30:38 +02:00 committed by Christian Helmuth
parent 2d8bfd8569
commit 0dd9c6a018
7 changed files with 25 additions and 1 deletions

View File

@ -33,4 +33,6 @@ proc run_power_on { } {
exec curl -s -o /dev/null -d pw=$password http://$host/login.html
exec curl -s -o /dev/null -d ctl$power_port=1 http://$host/status.html
exec curl -s -o /dev/null http://$host/login.html
return true
}

View File

@ -10,6 +10,8 @@ proc run_power_on { } {
eval spawn ./core
set linux_spawn_id $spawn_id
cd $linux_orig_pwd
return true
}

View File

@ -51,4 +51,6 @@ proc run_power_on { } {
send -i $connection_id "port $power_port int\n"
expect -i $connection_id "250 OK"
}
return true
}

View File

@ -97,4 +97,6 @@ proc run_power_on { } {
eval spawn $qemu $qemu_args
set qemu_spawn_id $spawn_id
return true
}

View File

@ -57,4 +57,13 @@ proc run_power_on { } {
send -i $connection_id "$relay_on\n"
sleep 1
send -i $connection_id "$relay_off\n"
sleep 1
close -i $connection_id
lassign [wait] pid spawnid os_error_flag value
if {$value} {
return false
}
return true
}

View File

@ -23,4 +23,6 @@ proc run_power_on { } {
set spike "spike"
eval spawn $spike $spike_args
set spike_spawn_id $spawn_id
return true
}

View File

@ -158,7 +158,12 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id
set retry 3
while { $retry != 0 } {
run_power_on
if {[expr [run_power_on] == false]} {
puts "Power on step failed, retry."
sleep 3
incr retry -1;
continue
}
if {![run_load]} {
puts "Load step failed, retry."