genode/tool/run/log/qemu

39 lines
682 B
Plaintext
Raw Normal View History

2015-01-08 22:08:48 +01:00
##
# 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
2015-10-26 15:02:14 +01:00
set kernel_msg [run_boot_string]
2015-11-03 14:47:42 +01:00
if {$wait_for_re == "forever"} {
set timeout -1
} else {
set timeout $timeout_value
}
2015-10-26 15:02:14 +01:00
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
}
}
2015-01-08 22:08:48 +01:00
wait_for_output $wait_for_re $timeout_value $qemu_spawn_id
2015-10-26 15:02:14 +01:00
return true
2015-01-08 22:08:48 +01:00
}