2
0
Fork 0

Test consolidation

This commit is contained in:
Emery Hemingway 2020-04-13 23:56:01 +05:30
parent 6aa43a1129
commit 78c5a2bb19
21 changed files with 341 additions and 304 deletions

View File

@ -27,16 +27,17 @@ let addLine =
} }
e.mapValue e.mapValue
in λ(args : Args) -> \(out : Text) in λ(args : Args)
→ λ(out : Text)
{ config = Genode.Init.render args.config → { config = Genode.Init.render args.config
, script = Prelude.List.fold , script =
RomEntry Prelude.List.fold
args.rom RomEntry
Text args.rom
addLine Text
'' addLine
#!/bin/sh ''
ln -s ${out}/config config #!/bin/sh
'' ln -s ${out}/config config
} ''
}

View File

@ -1,6 +1,8 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let Prelude = Genode.Prelude let Prelude = Genode.Prelude
@ -14,8 +16,8 @@ let Resources = Init.Resources
let ServiceRoute = Init.ServiceRoute let ServiceRoute = Init.ServiceRoute
in Genode.Boot::{ let init =
, config = Init::{ Init::{
, verbose = True , verbose = True
, children = , children =
let blockTest = let blockTest =
@ -112,7 +114,9 @@ in Genode.Boot::{
[ XML.leaf [ XML.leaf
{ name = "partition" { name = "partition"
, attributes = toMap , attributes = toMap
{ type = "24B69406-18A1-428D-908E-D21A1437122C" } { type =
"24B69406-18A1-428D-908E-D21A1437122C"
}
} }
] ]
} }
@ -129,6 +133,9 @@ in Genode.Boot::{
, test-part2 = blockTest , test-part2 = blockTest
} }
} }
in Test::{
, children = Test.initToChildren init
, rom = , rom =
Genode.BootModules.toRomPaths Genode.BootModules.toRomPaths
[ { mapKey = "gpt.rom", mapValue = "./gpt.raw" } ] [ { mapKey = "gpt.rom", mapValue = "./gpt.raw" } ]

View File

@ -45,7 +45,7 @@ let
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})"; testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
testEnv' = { testEnv' = {
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall"; DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
XDG_CACHE_HOME = "/tmp"; DHALL_GENODE_TEST = "${./test.dhall}";
} // testEnv; } // testEnv;
image = lib.hwImage name testEnv' testConfig'; image = lib.hwImage name testEnv' testConfig';

View File

@ -43,7 +43,7 @@ let
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})"; testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
env' = { env' = {
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall"; DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
XDG_CACHE_HOME = "/tmp"; DHALL_GENODE_TEST = "${./test.dhall}";
} // env; } // env;
build = lib.linuxScript name env' testConfig'; build = lib.linuxScript name env' testConfig';
@ -70,9 +70,6 @@ let
global image_dir spawn_id global image_dir spawn_id
global env
set env(XDG_CACHE_HOME) /tmp
exec sh ${build}/script exec sh ${build}/script
spawn ./core-linux spawn ./core-linux
@ -100,13 +97,13 @@ let
in test // { in test // {
inherit build driver test; inherit build driver test;
config = buildPackages.runCommand (name + ".dhall") env' '' config = lib.runDhallCommand (name + ".dhall") env' ''
${apps.dhall.program} <<< "(${testConfig'}).config" > $out ${apps.dhall.program} <<< "(${testConfig'}).config" > $out
''; '';
xml = buildPackages.runCommand (name + ".config") env' '' xml = lib.runDhallCommand (name + ".config") env' ''
${apps.render-init.program} <<< "(${testConfig'}).config" > $out ${apps.render-init.program} <<< "(${testConfig'}).config" > $out
''; '';
image = buildPackages.runCommand (name + ".image.elf") env' '' image = lib.runDhallCommand (name + ".image.elf") env' ''
mkdir -p $out mkdir -p $out
pushd $out pushd $out
. ${build}/script . ${build}/script

View File

@ -46,7 +46,7 @@ let
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})"; testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
testEnv' = { testEnv' = {
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall"; DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
XDG_CACHE_HOME = "/tmp"; DHALL_GENODE_TEST = "${./test.dhall}";
} // testEnv; } // testEnv;
image = lib.novaImage name testEnv' testConfig'; image = lib.novaImage name testEnv' testConfig';

View File

@ -1,8 +1,10 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let drivers = env:drivers ? ../compositions/pc-drivers.dhall let drivers = env:drivers ? ../compositions/pc-drivers.dhall
let Genode = env:DHALL_GENODE let Genode = Test.Genode
let Init = Genode.Init let Init = Genode.Init
@ -24,8 +26,8 @@ let childRomRoute =
let label = λ(_ : Text) → { local = _, route = _ } let label = λ(_ : Text) → { local = _, route = _ }
in Genode.Boot::{ let init =
, config = Init::{ Init::{
, verbose = True , verbose = True
, children = toMap , children = toMap
{ drivers = { drivers =
@ -91,59 +93,61 @@ in Genode.Boot::{
} }
} }
} }
, rom =
Genode.Boot.toRomTexts let rom =
( toMap Genode.Boot.toRomTexts
{ capslock = "<feature_creep/>" ( toMap
, numlock = "<feature_creep/>" { capslock = "<feature_creep/>"
, usb_policy = "<usb/>" , numlock = "<feature_creep/>"
} , usb_policy = "<usb/>"
# [ { mapKey = "fb_drv.config" }
, mapValue = # [ { mapKey = "fb_drv.config"
'' , mapValue =
<config width="1024" height="768" buffered="yes"/> ''
<report connectors="yes"/> <config width="1024" height="768" buffered="yes"/>
</config> <report connectors="yes"/>
'' </config>
} ''
, { mapKey = "input_filter.config" }
, mapValue = , { mapKey = "input_filter.config"
'' , mapValue =
<config> ''
<input label="ps2"/> <config>
<input label="usb"/> <input label="ps2"/>
<output> <input label="usb"/>
<chargen> <output>
<remap> <chargen>
<key name="KEY_F11" to="KEY_RESTART"/> <remap>
<key name="KEY_F12" to="KEY_DASHBOARD"/> <key name="KEY_F11" to="KEY_RESTART"/>
<key name="KEY_LEFTMETA" to="KEY_SCREEN"/> <key name="KEY_F12" to="KEY_DASHBOARD"/>
<merge> <key name="KEY_LEFTMETA" to="KEY_SCREEN"/>
<accelerate max="50" sensitivity_percent="1000" curve="127"> <merge>
<button-scroll> <accelerate max="50" sensitivity_percent="1000" curve="127">
<input name="ps2"/> <button-scroll>
<vertical button="BTN_MIDDLE" speed_percent="-10"/> <input name="ps2"/>
<horizontal button="BTN_MIDDLE" speed_percent="-10"/> <vertical button="BTN_MIDDLE" speed_percent="-10"/>
</button-scroll> <horizontal button="BTN_MIDDLE" speed_percent="-10"/>
</accelerate> </button-scroll>
<input name="usb"/> </accelerate>
</merge> <input name="usb"/>
</remap> </merge>
<mod1> </remap>
<key name="KEY_LEFTSHIFT"/> <key name="KEY_RIGHTSHIFT"/> <mod1>
</mod1> <key name="KEY_LEFTSHIFT"/> <key name="KEY_RIGHTSHIFT"/>
<mod2> </mod1>
<key name="KEY_LEFTCTRL"/> <key name="KEY_RIGHTCTRL"/> <mod2>
</mod2> <key name="KEY_LEFTCTRL"/> <key name="KEY_RIGHTCTRL"/>
<mod3> </mod2>
<key name="KEY_RIGHTALT"/> <!-- AltGr --> <mod3>
</mod3> <key name="KEY_RIGHTALT"/> <!-- AltGr -->
<repeat delay_ms="230" rate_ms="40"/> </mod3>
</chargen> <repeat delay_ms="230" rate_ms="40"/>
</output> </chargen>
</config> </output>
'' </config>
} ''
] }
) ]
} )
in Test::{ children = Test.initToChildren init, rom = rom }

View File

@ -1,23 +1,23 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let Child = Genode.Init.Child let Child = Genode.Init.Child
in Genode.Boot::{ in Test::{
, config = Genode.Init::{ , children = toMap
, children = toMap { test-log =
{ test-log = Child.flat
Child.flat Child.Attributes::{
Child.Attributes::{ , binary = "test-log"
, binary = "test-log" , exitPropagate = True
, exitPropagate = True , resources = Genode.Init.Resources::{
, resources = Genode.Init.Resources::{ , caps = 500
, caps = 500 , ram = Genode.units.MiB 10
, ram = Genode.units.MiB 10
}
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
} }
} , routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
} }
}
} }

View File

@ -1,46 +1,46 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let Child = Genode.Init.Child let Child = Genode.Init.Child
in Genode.Boot::{ in Test::{
, config = Genode.Init::{ , children = toMap
, children = toMap { noux =
{ noux = Child.flat
Child.flat Child.Attributes::{
Child.Attributes::{ , binary = "noux"
, binary = "noux" , exitPropagate = True
, exitPropagate = True , resources = Genode.Init.Resources::{
, resources = Genode.Init.Resources::{ , caps = 500
, caps = 500 , ram = Genode.units.MiB 10
, ram = Genode.units.MiB 10
}
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
, config = Genode.Init.Config::{
, attributes = toMap
{ stdin = "/script"
, stdout = "/dev/log"
, stderr = "/dev/log"
}
, content =
[ Genode.Prelude.XML.text
''
<fstab>
<tar name="bash-minimal.tar" />
<dir name="dev"> <log/> <null/> <zero/> </dir>
<dir name="tmp"> <ram /> </dir>
<inline name="script">
echo "hello world"
</inline>
</fstab>
<start name="/bin/bash">
<env name="TERM" value="screen" />
</start>
''
]
}
} }
} , routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
} , config = Genode.Init.Config::{
, attributes = toMap
{ stdin = "/script"
, stdout = "/dev/log"
, stderr = "/dev/log"
}
, content =
[ Genode.Prelude.XML.text
''
<fstab>
<tar name="bash-minimal.tar" />
<dir name="dev"> <log/> <null/> <zero/> </dir>
<dir name="tmp"> <ram /> </dir>
<inline name="script">
echo "hello world"
</inline>
</fstab>
<start name="/bin/bash">
<env name="TERM" value="screen" />
</start>
''
]
}
}
}
} }

View File

@ -1,6 +1,8 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let XML = Genode.Prelude.XML let XML = Genode.Prelude.XML
@ -14,8 +16,8 @@ let ServiceRoute = Init.ServiceRoute
let label = λ(_ : Text) → { local = _, route = _ } : Child.Attributes.Label let label = λ(_ : Text) → { local = _, route = _ } : Child.Attributes.Label
in Genode.Boot::{ let init =
, config = Init::{ Init::{
, verbose = True , verbose = True
, children = toMap , children = toMap
{ test-pci = { test-pci =
@ -71,4 +73,5 @@ in Genode.Boot::{
} }
} }
} }
}
in Test::{ children = Test.initToChildren init }

View File

@ -1,11 +1,13 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let Child = Genode.Init.Child let Child = Genode.Init.Child
in Genode.Boot::{ let init =
, config = Genode.Init::{ Genode.Init::{
, children = toMap , children = toMap
{ test-rtc = { test-rtc =
Child.flat Child.flat
@ -26,4 +28,5 @@ in Genode.Boot::{
} }
} }
} }
}
in Test::{ children = Test.initToChildren init }

View File

@ -1,26 +1,26 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let Init = Genode.Init let Init = Genode.Init
let Child = Init.Child let Child = Init.Child
in Genode.Boot::{ in Test::{
, config = Init::{ , children = toMap
, children = toMap { test-signal =
{ test-signal = Child.flat
Child.flat Child.Attributes::{
Child.Attributes::{ , binary = "test-signal"
, binary = "test-signal" , exitPropagate = True
, exitPropagate = True , priority = 5
, priority = 5 , resources = Init.Resources::{
, resources = Init.Resources::{ , caps = 500
, caps = 500 , ram = Genode.units.MiB 10
, ram = Genode.units.MiB 10
}
, routes = [ Init.ServiceRoute.parent "Timer" ]
} }
} , routes = [ Init.ServiceRoute.parent "Timer" ]
} }
}
} }

View File

@ -6,8 +6,8 @@ let Init = Genode.Init
let Child = Init.Child let Child = Init.Child
in Genode.Boot::{ let init =
, config = Init::{ Init::{
, children = toMap , children = toMap
{ solo5 = { solo5 =
Child.flat Child.flat
@ -35,4 +35,5 @@ in Genode.Boot::{
} }
} }
} }
}
in Init.toChild init Init.Attributes.default

View File

@ -5,7 +5,7 @@ with pkgs;
let let
defaultScript = '' defaultScript = ''
run_genode_until {SUCCESS} 30 run_genode_until {SOTEST END} 30
''; '';
mkTest' = { name, testConfig, testScript ? defaultScript, testInputs ? [ ] mkTest' = { name, testConfig, testScript ? defaultScript, testInputs ? [ ]
@ -23,66 +23,30 @@ let
mkTests = testList: builtins.listToAttrs (map applyMkTest testList); mkTests = testList: builtins.listToAttrs (map applyMkTest testList);
toSimple = name: ''(${./simple.dhall} \"solo5-test_${name}\")'';
genodeDepot = pkgs.genodeSources.depot; genodeDepot = pkgs.genodeSources.depot;
genodeMake = pkgs.genodeSources.make; genodeMake = pkgs.genodeSources.make;
tests = [ tests = [
{ {
name = "blk"; name = "multi";
testConfig = ./blk.dhall; testConfig = "${./.}/solo5.dhall";
testInputs = [ (genodeDepot "ram_block") ]; testInputs = map genodeMake [ "app/ping" ] ++ (map genodeDepot [
} "ram_block"
"nic_bridge"
{ "nic_loopback"
name = "fpu"; "sequence"
testConfig = toSimple "fpu"; "rtc_drv"
} ]);
{
name = "globals";
testConfig = toSimple "globals";
}
{
name = "hello";
testConfig = toSimple "hello";
}
{
name = "net";
testConfig = ./net.dhall;
testInputs = (map genodeDepot [ "nic_bridge" "nic_loopback" ])
++ (map genodeMake [ "app/ping" ]);
}
{
name = "net_2if";
testConfig = ./net_2if.dhall;
testInputs = (map genodeDepot [ "sequence" "nic_bridge" "nic_loopback" ])
++ (map genodeMake [ "app/ping" ]);
}
{
name = "quiet";
testConfig = toSimple "quiet";
} }
{ {
name = "ssp"; name = "ssp";
testConfig = toSimple "ssp"; testConfig = ./ssp.dhall;
testScript = '' testScript = ''
run_genode_until {Error: stack protector check failed} 30 run_genode_until {Error: stack protector check failed} 30
''; '';
} }
] ++ (testEnv.lib.optional (!testEnv.isLinux) { ];
name = "time";
testConfig = ./time.dhall;
testInputs = [ (genodeDepot "rtc_drv") ];
}
);
in mkTests tests in mkTests tests

View File

@ -10,8 +10,8 @@ let Res = Init.Resources
let ServiceRoute = Init.ServiceRoute let ServiceRoute = Init.ServiceRoute
in Genode.Boot::{ let init =
, config = Init::{ Init::{
, children = toMap , children = toMap
{ nic = { nic =
Child.flat Child.flat
@ -72,4 +72,5 @@ in Genode.Boot::{
} }
} }
} }
}
in Init.toChild init Init.Attributes.default

View File

@ -8,8 +8,8 @@ let Child = Init.Child
let Res = Init.Resources let Res = Init.Resources
in Genode.Boot::{ let init =
, config = Init::{ Init::{
, children = toMap , children = toMap
{ nic = { nic =
Child.flat Child.flat
@ -81,4 +81,5 @@ in Genode.Boot::{
} }
} }
} }
}
in Init.toChild init Init.Attributes.default

View File

@ -1,39 +0,0 @@
-- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let Init = Genode.Init
let Child = Init.Child
let Config = Init.Config
in λ(testBinary : Text)
→ Genode.Boot::{
, config = Init::{
, children = toMap
{ solo5 =
Child.flat
Child.Attributes::{
, binary = testBinary
, exitPropagate = True
, resources = Init.Resources::{
, caps = 256
, ram = Genode.units.MiB 3
}
, config = Config::{
, content =
[ Prelude.XML.element
{ name = "cmdline"
, attributes = Prelude.XML.emptyAttributes
, content = [ Prelude.XML.text "Hello_Solo5" ]
}
]
}
, routes = [ Init.ServiceRoute.parent "Timer" ]
}
}
}
}

45
tests/solo5/solo5.dhall Normal file
View File

@ -0,0 +1,45 @@
-- SPDX-License-Identifier: CC0-1.0
let Test = ../test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let Prelude = Genode.Prelude
let Init = Genode.Init
let Child = Init.Child
let Config = Init.Config
let toSimple =
λ(testName : Text)
→ Child.flat
Child.Attributes::{
, binary = "solo5-test_${testName}"
, resources = Init.Resources::{ caps = 256, ram = Genode.units.MiB 3 }
, config = Config::{
, content =
[ Prelude.XML.element
{ name = "cmdline"
, attributes = Prelude.XML.emptyAttributes
, content = [ Prelude.XML.text "Hello_Solo5" ]
}
]
}
, routes = [ Init.ServiceRoute.parent "Timer" ]
}
let tests
: Prelude.Map.Type Text Child.Type
= [ { mapKey = "quiet", mapValue = toSimple "quiet" }
, { mapKey = "hello", mapValue = toSimple "hello" }
, { mapKey = "globals", mapValue = toSimple "globals" }
, { mapKey = "fpu", mapValue = toSimple "fpu" }
, { mapKey = "time", mapValue = ./time.dhall }
, { mapKey = "blk", mapValue = ./blk.dhall }
, { mapKey = "net", mapValue = ./net.dhall }
, { mapKey = "net_2if", mapValue = ./net_2if.dhall }
]
in Test::{ children = tests }

9
tests/solo5/ssp.dhall Normal file
View File

@ -0,0 +1,9 @@
-- SPDX-License-Identifier: CC0-1.0
let Test = ../test.dhall ? env:DHALL_GENODE_TEST
let Child = Test.Genode.Init.Child
let test = Child.flat Child.Attributes::{ binary = "solo5-test_ssp" }
in Test::{ children = toMap { ssp = test } }

View File

@ -2,32 +2,38 @@
let Genode = env:DHALL_GENODE let Genode = env:DHALL_GENODE
let Child = Genode.Init.Child let Init = Genode.Init
in Genode.Boot::{ let Child = Init.Child
, config = Genode.Init::{
let init =
Init::{
, children = toMap , children = toMap
{ solo5 = { solo5 =
Child.flat Child.flat
Child.Attributes::{ Child.Attributes::{
, binary = "solo5-test_time" , binary = "solo5-test_time"
, exitPropagate = True , exitPropagate = True
, resources = Genode.Init.Resources::{ , resources = Init.Resources::{
, caps = 256 , caps = 256
, ram = Genode.units.MiB 3 , ram = Genode.units.MiB 3
} }
, routes = , routes =
[ Genode.Init.ServiceRoute.parent "Timer" [ Init.ServiceRoute.parent "Timer"
, Genode.Init.ServiceRoute.child "Rtc" "clock" , Init.ServiceRoute.child "Rtc" "rtc_drv"
] ]
} }
, clock = , rtc_drv =
Child.flat Child.flat
Child.Attributes::{ Child.Attributes::{
, binary = "rtc_drv" , binary = "rtc_drv"
, exitPropagate = True
, provides = [ "Rtc" ] , provides = [ "Rtc" ]
, routes = [ Genode.Init.ServiceRoute.parent "IO_PORT" ] , routes = [ Init.ServiceRoute.parent "IO_PORT" ]
} }
} }
} }
}
in Init.toChild
init
Init.Attributes::{ routes = [ Init.ServiceRoute.parent "IO_PORT" ] }

View File

@ -1,6 +1,7 @@
-- SPDX-License-Identifier: CC0-1.0 -- SPDX-License-Identifier: CC0-1.0
let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = env:DHALL_GENODE let Genode = Test.Genode
let Prelude = Genode.Prelude let Prelude = Genode.Prelude
@ -8,13 +9,18 @@ let Init = Genode.Init
let Child = Init.Child let Child = Init.Child
let TextMapType = Prelude.Map.Type Text
let Children = TextMapType Child.Type
let wrapHarness let wrapHarness
: Init.Type → Child.Type : Children → Child.Type
= λ(init : Init.Type) = λ(children : Children)
→ Child.nested → Child.nested
(toMap { init = Genode.Init.toChild init Init.Attributes.default }) children
Child.Attributes::{ Child.Attributes::{
, binary = "sotest-harness" , binary = "sotest-harness"
, exitPropagate = True
, resources = Init.Resources::{ ram = Genode.units.MiB 4 } , resources = Init.Resources::{ ram = Genode.units.MiB 4 }
, routes = , routes =
[ Init.ServiceRoute.parentLabel [ Init.ServiceRoute.parentLabel
@ -28,35 +34,31 @@ let wrapHarness
] ]
} }
let TextMapType = Prelude.Map.Type Text in λ(test : Test.Type)
in λ(boot : Genode.Boot.Type)
→ λ(inputsManifest : TextMapType (TextMapType Text)) → λ(inputsManifest : TextMapType (TextMapType Text))
→ boot → Genode.Boot::{
⫽ { config = Init::{ , config = Init::{
, children = , children =
[ { mapKey = "timer" [ { mapKey = "timer"
, mapValue = , mapValue =
Child.flat Child.flat
Child.Attributes::{ Child.Attributes::{
, binary = "timer_drv" , binary = "timer_drv"
, provides = [ "Timer" ] , provides = [ "Timer" ]
} }
} }
, { mapKey = "harness", mapValue = wrapHarness boot.config } , { mapKey = "harness", mapValue = wrapHarness test.children }
] ]
}
, rom =
let inputRoms =
Genode.BootModules.toRomPaths
( Prelude.List.concat
(Prelude.Map.Entry Text Text)
( Prelude.Map.values
Text
(Prelude.Map.Type Text Text)
inputsManifest
)
)
in boot.rom # inputRoms
} }
, rom =
test.rom
# Genode.BootModules.toRomPaths
( Prelude.List.concat
(Prelude.Map.Entry Text Text)
( Prelude.Map.values
Text
(Prelude.Map.Type Text Text)
inputsManifest
)
)
}

32
tests/test.dhall Normal file
View File

@ -0,0 +1,32 @@
let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let Init = Genode.Init
in { Genode = Genode
, Type =
{ children : Prelude.Map.Type Text Init.Child.Type
, rom : Genode.BootModules.Type
}
, default.rom = [] : Genode.BootModules.Type
, initToChildren =
λ(init : Init.Type)
→ toMap
{ init =
Init.toChild
init
Init.Attributes::{
, 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"
]
}
}
}