test/trace_logger: fully automate test

Issue #2735

Co-authored-by: Martin Stein <martin.stein@genode-labs.com>
This commit is contained in:
Johannes Schlatow 2018-04-10 16:14:44 +02:00 committed by Christian Helmuth
parent b47bf81b73
commit 48aa50b97c
3 changed files with 15 additions and 5 deletions

View File

@ -82,7 +82,7 @@ append config {
<policy label="init -> test-trace_logger"
thread="ep"
buffer="1M"
buffer="4K"
policy="rpc_name"/>
</config>
</start>
@ -167,6 +167,15 @@ lappend_if [have_spec gpio] boot_modules [gpio_drv]
build_boot_image $boot_modules
append qemu_args " -smp 4,cores=4 "
append qemu_args " -nographic "
run_genode_until forever
if {[have_spec x86]} { append qemu_args " -smp 4,cores=4 " }
set done_string ""
for {set i 50} {$i <= 100} {incr i 1} {
append done_string ".*trace_logger\] $i .*\n"
append done_string ".*trace_logger\] trigger_once.*\n"
append done_string ".*trace_logger\] trigger_once.*\n"
}
run_genode_until $done_string 60

View File

@ -22,8 +22,8 @@ using namespace Genode;
void Component::construct(Genode::Env &env)
{
Timer::Connection timer(env);
for (unsigned i = 0; i < 20; i++) {
timer.msleep(500);
for (unsigned i = 0; ; i++) {
timer.msleep(100);
Thread::trace(String<32>(i, " ", Trace::timestamp()).string());
}
env.parent().exit(0);

View File

@ -119,3 +119,4 @@ verify
fetchurl
depot_query
depot_download
trace_logger