2018-11-26 18:43:53 +00:00
|
|
|
# RTC test
|
|
|
|
|
2019-07-01 15:23:33 +00:00
|
|
|
assert_spec x86
|
|
|
|
|
2019-08-14 07:12:12 +00:00
|
|
|
# RTC setting tested on Qemu only
|
2019-07-01 15:23:33 +00:00
|
|
|
set test_update [have_include power_on/qemu]
|
|
|
|
|
|
|
|
set build_components { core init drivers/rtc timer test/rtc }
|
|
|
|
append_if $test_update build_components { server/report_rom }
|
2018-11-26 18:43:53 +00:00
|
|
|
|
2019-07-01 15:23:33 +00:00
|
|
|
build $build_components
|
2018-11-26 18:43:53 +00:00
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
2019-07-01 15:23:33 +00:00
|
|
|
set config {
|
2018-11-26 18:43:53 +00:00
|
|
|
<config prio_levels="2" verbose="yes">
|
|
|
|
<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>
|
|
|
|
<default caps="100"/>
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Timer"/> </provides>
|
2019-07-01 15:23:33 +00:00
|
|
|
</start>}
|
|
|
|
append_if $test_update config {
|
|
|
|
<start name="report_rom">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
|
|
<config verbose="yes">
|
|
|
|
<policy label_suffix="set_rtc" report="test-rtc -> set_rtc"/>
|
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
append_if [have_spec linux] config {
|
|
|
|
<start name="linux_rtc_drv" priority="-1" ld="no">}
|
|
|
|
append_if [expr ![have_spec linux]] config {
|
|
|
|
<start name="rtc_drv" priority="-1">}
|
|
|
|
append config {
|
2018-11-26 18:43:53 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
2019-07-01 15:23:33 +00:00
|
|
|
<provides><service name="Rtc"/></provides>}
|
|
|
|
append_if $test_update config {
|
|
|
|
<config allow_setting_rtc="true"/>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" label="set_rtc">
|
|
|
|
<child name="report_rom"/>
|
|
|
|
</service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>}
|
|
|
|
append config {
|
2018-11-26 18:43:53 +00:00
|
|
|
</start>
|
|
|
|
<start name="test-rtc" priority="-1">
|
2019-07-01 15:23:33 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>}
|
|
|
|
append_if $test_update config {
|
2019-08-14 07:12:12 +00:00
|
|
|
<config set_rtc="yes" year="2069" month="12" day="31" hour="23" minute="55" second="0"/>}
|
2019-07-01 15:23:33 +00:00
|
|
|
append config {
|
2018-11-26 18:43:53 +00:00
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
2019-07-01 15:23:33 +00:00
|
|
|
install_config $config
|
|
|
|
|
|
|
|
set boot_components {
|
|
|
|
core ld.lib.so init timer test-rtc
|
|
|
|
}
|
|
|
|
|
|
|
|
append_if $test_update boot_components { report_rom }
|
|
|
|
|
|
|
|
append_if [have_spec linux] boot_components { linux_rtc_drv }
|
|
|
|
append_if [expr ![have_spec linux]] boot_components { rtc_drv }
|
|
|
|
|
|
|
|
build_boot_image $boot_components
|
2018-11-26 18:43:53 +00:00
|
|
|
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
|
2019-12-20 13:28:18 +00:00
|
|
|
run_genode_until ".*--- RTC test finished ---.*\n" 60
|