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>
|
2019-12-23 21:56:01 +00:00
|
|
|
<start name="test-cpu_scheduler" caps="100">
|
2016-09-13 09:01:15 +00:00
|
|
|
<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
|
2022-12-08 20:28:34 +00:00
|
|
|
run_genode_until "child .test-cpu_scheduler. exited with exit value .*\n" 10
|
2014-10-09 12:24:27 +00:00
|
|
|
|
|
|
|
# check the output
|
2022-12-08 20:28:34 +00:00
|
|
|
grep_output {child .test-cpu_scheduler. exited with exit value}
|
|
|
|
compare_output_to { [init] child "test-cpu_scheduler" exited with exit value 0 }
|