diff --git a/tests/driver-linux-config.dhall b/tests/driver-linux-config.dhall index 3207931..398b0ce 100644 --- a/tests/driver-linux-config.dhall +++ b/tests/driver-linux-config.dhall @@ -1,40 +1,70 @@ -- SPDX-License-Identifier: CC0-1.0 let Genode = env:DHALL_GENODE -let Args = - { config : Genode.Init.Type - , rom : Genode.Prelude.Map.Type Text Genode.Boot.Rom - } - : Type +let Prelude = Genode.Prelude -in λ(args : Args) - → { config = - Genode.Init::{ - , verbose = True - , defaultRoutes = - Genode.Init.default.defaultRoutes - # [ Genode.ServiceRoute.child "Timer" "timer" ] - , children = - [ { mapKey = "timer" - , mapValue = - Genode.Init.Start::{ - , binary = "linux_timer_drv" - , resources = { caps = 96, ram = Genode.units.MiB 1 } - , provides = [ "Timer" ] +in λ(boot : Genode.Boot.Type) + → let child = + { mapKey = "test", mapValue = Genode.Init.toStart boot.config } + + in { config = + Genode.Init::{ + , verbose = True + , defaultRoutes = + Genode.Init.default.defaultRoutes + # [ Genode.ServiceRoute.child "Timer" "timer" ] + , children = + [ { mapKey = "timer" + , mapValue = + Genode.Init.Start::{ + , binary = "linux_timer_drv" + , resources = { caps = 96, ram = Genode.units.MiB 1 } + , provides = [ "Timer" ] + } } - } - , { mapKey = "test", mapValue = Genode.Init.toStart args.config } - ] + , { mapKey = "harness" + , mapValue = + Genode.Init.Start::{ + , binary = "sotest-harness" + , exitPropagate = True + , resources = + { caps = child.mapValue.resources.caps + 128 + , ram = + child.mapValue.resources.ram + + Genode.units.MiB 1 + } + , config = + Some + ( Prelude.XML.element + { name = "config" + , attributes = Prelude.XML.emptyAttributes + , content = + [ Genode.Init.Start.toXML + child.mapKey + child.mapValue + ] + } + ) + , routes = + [ Genode.ServiceRoute.parentLabel + "LOG" + (Some "SOTEST") + (Some "unlabeled") + ] + } + } + ] + } + , rom = + let manifest = env:MANIFEST + + in Genode.Boot.toRomPaths + [ manifest.base-linux.bin.core-linux + , manifest.base-linux.bin.ld + , manifest.base-linux.bin.linux_timer_drv + , manifest.os.bin.init + , manifest.sotest-producer.bin.sotest-harness + ] + # boot.rom + : Genode.Prelude.Map.Type Text Genode.Boot.Rom } - , rom = - let manifest = env:MANIFEST - - in Genode.Boot.toRomPaths - [ manifest.base-linux.bin.ld - , manifest.base-linux.bin.linux_timer_drv - , manifest.os.bin.init - , manifest.base-linux.bin.core-linux - ] - # args.rom - : Genode.Prelude.Map.Type Text Genode.Boot.Rom - } diff --git a/tests/driver-linux.nix b/tests/driver-linux.nix index c4b2932..7ae09b8 100644 --- a/tests/driver-linux.nix +++ b/tests/driver-linux.nix @@ -42,7 +42,7 @@ let DHALL_PRELUDE = "${testPkgs.dhallPrelude}/package.dhall"; DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall"; MANIFEST = lib.mergeManifests (with testPkgs; - [ genode.base-linux genode.os ] ++ testInputs); + [ genode.base-linux genode.os sotest-producer ] ++ testInputs); } // env; toExports = env: