diff --git a/base-linux/run/env b/base-linux/run/env index ad701b04b9..6f31520db4 100644 --- a/base-linux/run/env +++ b/base-linux/run/env @@ -35,18 +35,13 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id return } - global output - set timeout $timeout_value + global spawn_id + set orig_pwd [pwd] cd [run_dir] - set pid [spawn ./core] - if {$wait_for_re == "forever"} { interact $pid } - expect { - -re $wait_for_re { } - timeout { puts stderr "Error: Test execution timed out"; exit -2 } - } + spawn ./core + wait_for_output $wait_for_re $timeout_value $spawn_id cd $orig_pwd - set output $expect_out(buffer) }