Browse Source

Add Rtc test

20.02
Emery Hemingway 2 years ago
parent
commit
33d11182e3
  1. 2
      tests/default.nix
  2. 29
      tests/rtc.dhall
  3. 13
      tests/rtc.nix

2
tests/default.nix

@ -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

@ -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

@ -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";
}
Loading…
Cancel
Save