mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-29 05:34:23 +00:00
run: add error checking to power on step
This commit is contained in:
parent
2d8bfd8569
commit
0dd9c6a018
@ -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 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 -d ctl$power_port=1 http://$host/status.html
|
||||||
exec curl -s -o /dev/null http://$host/login.html
|
exec curl -s -o /dev/null http://$host/login.html
|
||||||
|
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@ proc run_power_on { } {
|
|||||||
eval spawn ./core
|
eval spawn ./core
|
||||||
set linux_spawn_id $spawn_id
|
set linux_spawn_id $spawn_id
|
||||||
cd $linux_orig_pwd
|
cd $linux_orig_pwd
|
||||||
|
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,4 +51,6 @@ proc run_power_on { } {
|
|||||||
send -i $connection_id "port $power_port int\n"
|
send -i $connection_id "port $power_port int\n"
|
||||||
expect -i $connection_id "250 OK"
|
expect -i $connection_id "250 OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
@ -97,4 +97,6 @@ proc run_power_on { } {
|
|||||||
|
|
||||||
eval spawn $qemu $qemu_args
|
eval spawn $qemu $qemu_args
|
||||||
set qemu_spawn_id $spawn_id
|
set qemu_spawn_id $spawn_id
|
||||||
|
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
@ -57,4 +57,13 @@ proc run_power_on { } {
|
|||||||
send -i $connection_id "$relay_on\n"
|
send -i $connection_id "$relay_on\n"
|
||||||
sleep 1
|
sleep 1
|
||||||
send -i $connection_id "$relay_off\n"
|
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
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,6 @@ proc run_power_on { } {
|
|||||||
set spike "spike"
|
set spike "spike"
|
||||||
eval spawn $spike $spike_args
|
eval spawn $spike $spike_args
|
||||||
set spike_spawn_id $spawn_id
|
set spike_spawn_id $spawn_id
|
||||||
|
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,12 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id
|
|||||||
set retry 3
|
set retry 3
|
||||||
while { $retry != 0 } {
|
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]} {
|
if {![run_load]} {
|
||||||
puts "Load step failed, retry."
|
puts "Load step failed, retry."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user