# RTC test
create_boot_directory
proc rtc_src { } {
if {[have_board linux]} { return "linux_rtc" }
if {[have_board pc]} { return "pc_rtc" }
return "dummy_rtc"
}
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/init \
[depot_user]/src/report_rom \
[depot_user]/src/[rtc_src]
proc rtc_driver_start_attributes { } {
if {[have_board linux]} { return { name="linux_rtc" ld="no" } }
if {[have_board pc]} { return { name="pc_rtc" } }
return { name="dummy_rtc" }
}
# RTC setting tested on Qemu only
proc test_update { } { return [have_include power_on/qemu] }
proc test_rtc_config { } {
if {![test_update]} {
return { } }
return {
}
}
proc additional_start_nodes_for_update_test { } {
if {![test_update]} {
return { } }
return {
}
}
proc rtc_driver_config_and_route { } {
if {![test_update]} {
return { } }
return {
}
}
install_config {
} [rtc_driver_config_and_route] {
} [test_rtc_config] {
} [additional_start_nodes_for_update_test] {
}
build { test/rtc }
build_boot_image [build_artifacts]
append qemu_args " -nographic "
run_genode_until ".*--- RTC test finished ---.*\n" 60