Test consolidation
parent
6aa43a1129
commit
78c5a2bb19
@ -1,23 +1,23 @@
|
||||
-- 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
|
||||
|
||||
in Genode.Boot::{
|
||||
, config = Genode.Init::{
|
||||
, children = toMap
|
||||
{ test-log =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "test-log"
|
||||
, exitPropagate = True
|
||||
, resources = Genode.Init.Resources::{
|
||||
, caps = 500
|
||||
, ram = Genode.units.MiB 10
|
||||
}
|
||||
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
|
||||
in Test::{
|
||||
, children = toMap
|
||||
{ test-log =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "test-log"
|
||||
, exitPropagate = True
|
||||
, resources = Genode.Init.Resources::{
|
||||
, caps = 500
|
||||
, ram = Genode.units.MiB 10
|
||||
}
|
||||
}
|
||||
}
|
||||
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,46 +1,46 @@
|
||||
-- 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
|
||||
|
||||
in Genode.Boot::{
|
||||
, config = Genode.Init::{
|
||||
, children = toMap
|
||||
{ noux =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "noux"
|
||||
, exitPropagate = True
|
||||
, resources = Genode.Init.Resources::{
|
||||
, caps = 500
|
||||
, 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>
|
||||
''
|
||||
]
|
||||
}
|
||||
in Test::{
|
||||
, children = toMap
|
||||
{ noux =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "noux"
|
||||
, exitPropagate = True
|
||||
, resources = Genode.Init.Resources::{
|
||||
, caps = 500
|
||||
, 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>
|
||||
''
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +1,26 @@
|
||||
-- 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 Child = Init.Child
|
||||
|
||||
in Genode.Boot::{
|
||||
, config = Init::{
|
||||
, children = toMap
|
||||
{ test-signal =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "test-signal"
|
||||
, exitPropagate = True
|
||||
, priority = 5
|
||||
, resources = Init.Resources::{
|
||||
, caps = 500
|
||||
, ram = Genode.units.MiB 10
|
||||
}
|
||||
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
||||
in Test::{
|
||||
, children = toMap
|
||||
{ test-signal =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "test-signal"
|
||||
, exitPropagate = True
|
||||
, priority = 5
|
||||
, resources = Init.Resources::{
|
||||
, caps = 500
|
||||
, ram = Genode.units.MiB 10
|
||||
}
|
||||
}
|
||||
}
|
||||
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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 }
|
@ -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 } }
|
@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue