2012-05-29 14:59:43 +00:00
|
|
|
#
|
|
|
|
# \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 {
|
2017-08-30 09:49:56 +00:00
|
|
|
<config prio_levels="2">
|
2012-05-29 14:59:43 +00:00
|
|
|
<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>
|
2017-08-30 09:49:56 +00:00
|
|
|
<start name="timer" caps="64" priority="0">
|
2016-11-28 14:13:14 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
2012-05-29 14:59:43 +00:00
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
2017-08-30 09:49:56 +00:00
|
|
|
<start name="client" caps="300" priority="-1">
|
2012-05-29 14:59:43 +00:00
|
|
|
<binary name="test-timer"/>
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
# Build boot files from source binaries
|
2016-12-01 18:00:11 +00:00
|
|
|
build_boot_image { core ld.lib.so init timer test-timer }
|
2012-05-29 14:59:43 +00:00
|
|
|
|
|
|
|
# Configure Qemu
|
2017-05-23 13:05:55 +00:00
|
|
|
append qemu_args " -nographic"
|
2012-05-29 14:59:43 +00:00
|
|
|
|
|
|
|
# Execute test in Qemu
|
2017-10-23 12:49:02 +00:00
|
|
|
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
|
|
|
|
}
|