Genode Packages collection
https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
697 B
32 lines
697 B
#! /usr/bin/env expect |
|
|
|
## |
|
# Wait for a specific output of a already running spawned process |
|
# |
|
proc wait_for_output { wait_for_re timeout_value running_spawn_id } { |
|
global output |
|
|
|
if {$wait_for_re == "forever"} { |
|
set timeout -1 |
|
interact { |
|
\003 { |
|
send_user "Expect: 'interact' received 'strg+c' and was cancelled\n"; |
|
exit |
|
} |
|
-i $running_spawn_id |
|
} |
|
} else { |
|
set timeout $timeout_value |
|
} |
|
|
|
expect { |
|
-i $running_spawn_id -re $wait_for_re { } |
|
eof { puts stderr "Error: Spawned process died unexpectedly"; exit -1 } |
|
timeout { puts stderr "Error: Test execution timed out"; exit -1 } |
|
} |
|
set output $expect_out(buffer) |
|
} |
|
|
|
eval $env(baseSetup) |
|
|
|
eval $env(testScript)
|
|
|