From 8a2e543b69c3611250324bc30d8c6b4a5dad6133 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Fri, 30 Aug 2013 12:54:07 +0200 Subject: [PATCH] run: use 'wait_for_output' for Linux, too With this patch, the Linux-specific 'run_genode_until' function uses 'wait_for_output' as it gets already used for other run targets. Fixes #863. --- base-linux/run/env | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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) }