2
0
Fork 0

Add Rtc test

This commit is contained in:
Emery Hemingway 2020-01-23 11:39:02 +01:00
parent adff57ad62
commit 33d11182e3
3 changed files with 43 additions and 1 deletions

View File

@ -20,7 +20,7 @@ let
inherit apps testPkgs hostPkgs lib depot;
}).callTest;
nova = (call: ((tests call) // { pci = call ./pci.nix { }; }))
nova = (call: ((tests call) // { pci = call ./pci.nix { }; rtc = call ./rtc.nix { }; }))
(import ./driver-nova.nix {
inherit apps system testPkgs hostPkgs lib depot;
}).callTest;

29
tests/rtc.dhall Normal file
View File

@ -0,0 +1,29 @@
-- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE
in { config =
Genode.Init::{
, verbose = True
, children =
toMap
{ test-rtc =
Genode.Init.Start::{
, binary = "test-rtc"
, resources = { caps = 128, ram = Genode.units.MiB 2 }
, exitPropagate = True
, routes =
[ Genode.ServiceRoute.parent "Timer"
, Genode.ServiceRoute.child "Rtc" "rtc_drv"
]
}
, rtc_drv =
Genode.Init.Start::{
, binary = "rtc_drv"
, provides = [ "Rtc" ]
, routes = [ Genode.ServiceRoute.parent "IO_PORT" ]
}
}
}
, rom = let os = env:OS_MANIFEST in [ os.bin.test-rtc, os.bin.rtc_drv ]
}

13
tests/rtc.nix Normal file
View File

@ -0,0 +1,13 @@
# SPDX-License-Identifier: CC0-1.0
{ testEnv, pkgs, ... }:
with pkgs;
testEnv.mkTest {
name = "rtc";
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ehmry ];
testConfig = ./rtc.dhall;
testScript = "run_genode_until {--- RTC test finished ---} 40";
}