2
0
Fork 0
genodepkgs/tests/test-wrapper.dhall

65 lines
1.7 KiB
Plaintext
Raw Normal View History

-- SPDX-License-Identifier: CC0-1.0
2020-04-13 20:26:01 +02:00
let Test = ./test.dhall ? env:DHALL_GENODE_TEST
2020-04-13 20:26:01 +02:00
let Genode = Test.Genode
let Prelude = Genode.Prelude
let Init = Genode.Init
let Child = Init.Child
2020-04-13 20:26:01 +02:00
let TextMapType = Prelude.Map.Type Text
let Children = TextMapType Child.Type
let wrapHarness
2020-04-13 20:26:01 +02:00
: Children → Child.Type
= λ(children : Children)
→ Child.nested
2020-04-13 20:26:01 +02:00
children
Child.Attributes::{
, binary = "sotest-harness"
2020-04-13 20:26:01 +02:00
, exitPropagate = True
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
, routes =
[ Init.ServiceRoute.parentLabel
"LOG"
(Some "SOTEST")
(Some "unlabeled")
, Init.ServiceRoute.parent "IO_MEM"
, Init.ServiceRoute.parent "IO_PORT"
, Init.ServiceRoute.parent "IRQ"
, Init.ServiceRoute.child "Timer" "timer"
]
}
2020-04-13 20:26:01 +02:00
in λ(test : Test.Type)
→ λ(inputsManifest : TextMapType (TextMapType Text))
2020-04-13 20:26:01 +02:00
→ Genode.Boot::{
, config = Init::{
, children =
[ { mapKey = "timer"
, mapValue =
Child.flat
Child.Attributes::{
, binary = "timer_drv"
, provides = [ "Timer" ]
}
}
, { mapKey = "harness", mapValue = wrapHarness test.children }
]
}
2020-04-13 20:26:01 +02:00
, rom =
test.rom
# Genode.BootModules.toRomPaths
( Prelude.List.concat
(Prelude.Map.Entry Text Text)
( Prelude.Map.values
Text
(Prelude.Map.Type Text Text)
inputsManifest
)
)
}