mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 23:12:24 +00:00
b26ac3c4fb
Fixes #1758
39 lines
682 B
Plaintext
39 lines
682 B
Plaintext
##
|
|
# Capture the output of a scenario executed via Qemu
|
|
#
|
|
|
|
source [genode_dir]/tool/run/log.inc
|
|
source [genode_dir]/tool/run/qemu.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
|
|
}
|