genode/repos/os/run/timer.run
2017-11-06 13:57:18 +01:00

54 lines
1.3 KiB
Plaintext

#
# \brief Basic test for genode timer-session
# \author Martin Stein
# \date 2012-05-29
#
# Build program images
build { core init drivers/timer test/timer }
# Create directory where boot files are written to
create_boot_directory
# Define XML configuration for init
install_config {
<config prio_levels="2">
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service><parent/><any-child/></any-service>
</default-route>
<start name="timer" caps="64" priority="0">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="client" caps="300" priority="-1">
<binary name="test-timer"/>
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
# Build boot files from source binaries
build_boot_image { core ld.lib.so init timer test-timer }
# Configure Qemu
append qemu_args " -nographic"
# Execute test in Qemu
run_genode_until {\[init\] child \"client\" exited with exit value.*\n} 60
grep_output {\[init\] child \"client\" exited with exit value}
compare_output_to {
[init] child "client" exited with exit value 0
}