diff --git a/tool/run/power_on/energenie b/tool/run/power_on/energenie index eb5f2baa0..bb19c57e2 100644 --- a/tool/run/power_on/energenie +++ b/tool/run/power_on/energenie @@ -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 } diff --git a/tool/run/power_on/linux b/tool/run/power_on/linux index 2b343f9f1..750c1efff 100644 --- a/tool/run/power_on/linux +++ b/tool/run/power_on/linux @@ -10,6 +10,8 @@ proc run_power_on { } { eval spawn ./core set linux_spawn_id $spawn_id cd $linux_orig_pwd + + return true } diff --git a/tool/run/power_on/netio b/tool/run/power_on/netio index ff150ab04..b9770128e 100644 --- a/tool/run/power_on/netio +++ b/tool/run/power_on/netio @@ -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 } diff --git a/tool/run/power_on/qemu b/tool/run/power_on/qemu index b939a9087..db2161fc0 100644 --- a/tool/run/power_on/qemu +++ b/tool/run/power_on/qemu @@ -97,4 +97,6 @@ proc run_power_on { } { eval spawn $qemu $qemu_args set qemu_spawn_id $spawn_id + + return true } diff --git a/tool/run/power_on/softreset b/tool/run/power_on/softreset index e9cdc5458..a00ec62f4 100644 --- a/tool/run/power_on/softreset +++ b/tool/run/power_on/softreset @@ -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 } diff --git a/tool/run/power_on/spike b/tool/run/power_on/spike index 7cf35bb79..536d58375 100644 --- a/tool/run/power_on/spike +++ b/tool/run/power_on/spike @@ -23,4 +23,6 @@ proc run_power_on { } { set spike "spike" eval spawn $spike $spike_args set spike_spawn_id $spawn_id + + return true } diff --git a/tool/run/run b/tool/run/run index c0a80a642..3be0f84e6 100755 --- a/tool/run/run +++ b/tool/run/run @@ -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."