genode/tool/run/log/qemu
Piotr Tworek fe0ad0addb tool: Consolidate qemu nic setup.
Right now the same code dealing with nic setup on qemu is duplicated
in many different run scripts. It makes it unnecesarily complex to
change the existing config or add support for new nic types. Lets move
all this common code to qemu.inc.

Ref #3825
2020-10-09 13:35:57 +02:00

38 lines
644 B
Plaintext

##
# Capture the output of a scenario executed via Qemu
#
source [genode_dir]/tool/run/log.inc
proc run_log { wait_for_re timeout_value } {
global qemu_spawn_id
global output_spawn_id
set output_spawn_id $qemu_spawn_id
set kernel_msg [run_boot_string]
if {$wait_for_re == "forever"} {
set timeout -1
} else {
set timeout $timeout_value
}
expect {
-i $output_spawn_id $kernel_msg { }
eof {
puts stderr "Aborting, received EOF"
return false
}
timeout {
puts stderr "Boot process timed out"
close
return false
}
}
wait_for_output $wait_for_re $timeout_value $qemu_spawn_id
return true
}