mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 22:47:50 +00:00
fe0ad0addb
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
38 lines
644 B
Plaintext
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
|
|
}
|