2014-10-09 12:24:27 +00:00
|
|
|
#
|
|
|
|
# \brief Test CPU-scheduler implementation of core
|
|
|
|
# \author Martin Stein
|
|
|
|
# \date 2014-09-30
|
|
|
|
#
|
|
|
|
|
|
|
|
# build program images
|
2016-09-13 09:01:15 +00:00
|
|
|
build "core init test/cpu_scheduler"
|
2014-10-09 12:24:27 +00:00
|
|
|
|
|
|
|
# create directory where the boot files are written to
|
|
|
|
create_boot_directory
|
|
|
|
|
2016-05-18 09:57:42 +00:00
|
|
|
# the init config is not used but the build system needs it
|
2016-09-13 09:01:15 +00:00
|
|
|
install_config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="RM"/>
|
2017-03-08 09:26:39 +00:00
|
|
|
<service name="PD"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="ROM"/>
|
2016-09-13 09:01:15 +00:00
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</default-route>
|
|
|
|
<start name="test-cpu_scheduler">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
</start>
|
|
|
|
</config>}
|
2016-05-18 09:57:42 +00:00
|
|
|
|
2014-10-09 12:24:27 +00:00
|
|
|
# create single boot image from the compiled program images
|
2016-12-01 18:00:11 +00:00
|
|
|
build_boot_image "core ld.lib.so init test-cpu_scheduler"
|
2014-10-09 12:24:27 +00:00
|
|
|
|
|
|
|
# configure qemu to use 64 MB RAM and avoid GUI mode
|
2017-05-23 13:05:55 +00:00
|
|
|
append qemu_args " -nographic"
|
2014-10-09 12:24:27 +00:00
|
|
|
|
|
|
|
# execute the test in qemu if the targeted platform is supported
|
|
|
|
run_genode_until "done.*\n" 10
|
|
|
|
|
|
|
|
# check the output
|
2016-09-13 09:01:15 +00:00
|
|
|
grep_output {\[init -> test-cpu_scheduler\]}
|
|
|
|
compare_output_to { [init -> test-cpu_scheduler] done }
|