Consolidate SOTEST wrapper for all test platforms
This commit is contained in:
parent
a2fc8f8ed1
commit
83d8a8881d
|
@ -2,71 +2,37 @@
|
||||||
|
|
||||||
let Genode = env:DHALL_GENODE
|
let Genode = env:DHALL_GENODE
|
||||||
|
|
||||||
let Prelude = Genode.Prelude
|
|
||||||
|
|
||||||
in λ(boot : Genode.Boot.Type)
|
in λ(boot : Genode.Boot.Type)
|
||||||
→ let child =
|
→ { config =
|
||||||
{ mapKey = "test", mapValue = Genode.Init.toStart boot.config }
|
Genode.Init::{
|
||||||
|
, defaultRoutes =
|
||||||
in { config =
|
Genode.Init.default.defaultRoutes
|
||||||
Genode.Init::{
|
# [ Genode.ServiceRoute.parent "IO_MEM"
|
||||||
, defaultRoutes =
|
, Genode.ServiceRoute.parent "IO_PORT"
|
||||||
Genode.Init.default.defaultRoutes
|
, Genode.ServiceRoute.parent "IRQ"
|
||||||
# [ Genode.ServiceRoute.parent "IO_MEM"
|
, Genode.ServiceRoute.child "Timer" "timer"
|
||||||
, Genode.ServiceRoute.parent "IO_PORT"
|
]
|
||||||
, Genode.ServiceRoute.parent "IRQ"
|
, children =
|
||||||
, Genode.ServiceRoute.child "Timer" "timer"
|
[ { mapKey = "timer"
|
||||||
]
|
, mapValue =
|
||||||
, children =
|
Genode.Init.Start::{
|
||||||
[ { mapKey = "timer"
|
, binary = "hw_timer_drv"
|
||||||
, mapValue =
|
, resources = { caps = 96, ram = Genode.units.MiB 1 }
|
||||||
Genode.Init.Start::{
|
, provides = [ "Timer" ]
|
||||||
, binary = "hw_timer_drv"
|
|
||||||
, resources = { caps = 96, ram = Genode.units.MiB 1 }
|
|
||||||
, provides = [ "Timer" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
, { mapKey = "harness"
|
}
|
||||||
, mapValue =
|
, { mapKey = "harness"
|
||||||
Genode.Init.Start::{
|
, mapValue = Genode.Init.toStart boot.config
|
||||||
, 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-hw-pc.lib.ld
|
|
||||||
, manifest.base-hw-pc.bin.hw_timer_drv
|
|
||||||
, manifest.os.bin.init
|
|
||||||
, manifest.sotest-producer.bin.sotest-harness
|
|
||||||
]
|
|
||||||
# boot.rom
|
|
||||||
}
|
}
|
||||||
|
, rom =
|
||||||
|
let manifest = env:MANIFEST
|
||||||
|
|
||||||
|
in Genode.Boot.toRomPaths
|
||||||
|
[ manifest.base-hw-pc.lib.ld
|
||||||
|
, manifest.base-hw-pc.bin.hw_timer_drv
|
||||||
|
, manifest.os.bin.init
|
||||||
|
]
|
||||||
|
# boot.rom
|
||||||
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ let
|
||||||
, env ? { }, ... # TODO: remove ...
|
, env ? { }, ... # TODO: remove ...
|
||||||
}@t:
|
}@t:
|
||||||
let
|
let
|
||||||
|
testConfig' = "${./driver-hw-config.dhall} (${./sotest-wrapper.dhall} ${testConfig})";
|
||||||
manifest = lib.mergeManifests (with testPkgs;
|
manifest = lib.mergeManifests (with testPkgs;
|
||||||
[ base-hw-pc genode.os sotest-producer ]
|
[ base-hw-pc genode.os sotest-producer ]
|
||||||
++ testInputs);
|
++ testInputs);
|
||||||
|
@ -49,8 +50,7 @@ let
|
||||||
MANIFEST = manifest;
|
MANIFEST = manifest;
|
||||||
} // env;
|
} // env;
|
||||||
|
|
||||||
image = apps.hw-image.function env'
|
image = apps.hw-image.function env' testConfig';
|
||||||
"${./driver-hw-config.dhall} ${testConfig}";
|
|
||||||
|
|
||||||
baseSetup = ''
|
baseSetup = ''
|
||||||
##
|
##
|
||||||
|
@ -91,9 +91,10 @@ let
|
||||||
|
|
||||||
global env
|
global env
|
||||||
global spawn_id
|
global spawn_id
|
||||||
|
set TEST_MIB [expr ($env(TEST_RAM) / 1048576) + 12]
|
||||||
spawn ${hostPkgs.qemu_test}/bin/qemu-system-x86_64 \
|
spawn ${hostPkgs.qemu_test}/bin/qemu-system-x86_64 \
|
||||||
-machine q35 -serial mon:stdio -nographic \
|
-machine q35 -serial mon:stdio -nographic \
|
||||||
-m size=[expr ($env(TEST_RAM) / 1048576) + 16] \
|
-m size=$TEST_MIB \
|
||||||
-kernel "${testPkgs.bender}" \
|
-kernel "${testPkgs.bender}" \
|
||||||
-initrd "${image}"
|
-initrd "${image}"
|
||||||
wait_for_output $wait_for_re $timeout_value $spawn_id
|
wait_for_output $wait_for_re $timeout_value $spawn_id
|
||||||
|
@ -107,7 +108,7 @@ let
|
||||||
driver = with hostPkgs;
|
driver = with hostPkgs;
|
||||||
buildPackages.runCommand "genode-test-driver-${name}" {
|
buildPackages.runCommand "genode-test-driver-${name}" {
|
||||||
buildInputs = [ makeWrapper expect ];
|
buildInputs = [ makeWrapper expect ];
|
||||||
inherit baseSetup testConfig testScript;
|
inherit baseSetup testScript;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
testName = name;
|
testName = name;
|
||||||
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
||||||
|
@ -116,7 +117,7 @@ let
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
echo "$testScript" > $out/test-script
|
echo "$testScript" > $out/test-script
|
||||||
echo "$baseSetup" > $out/base-setup
|
echo "$baseSetup" > $out/base-setup
|
||||||
eval $(${apps.dhall-to-bash.program} --declare "TEST_RAM" <<< "${./boot-ram.dhall} ${testConfig}")
|
eval $(${apps.dhall-to-bash.program} --declare "TEST_RAM" <<< "${./boot-ram.dhall} (${testConfig'})")
|
||||||
ln -s ${testDriver}/bin/genode-test-driver $out/bin/
|
ln -s ${testDriver}/bin/genode-test-driver $out/bin/
|
||||||
wrapProgram $out/bin/genode-test-driver \
|
wrapProgram $out/bin/genode-test-driver \
|
||||||
--set testScript "$testScript" \
|
--set testScript "$testScript" \
|
||||||
|
@ -135,17 +136,14 @@ let
|
||||||
|
|
||||||
config = hostPkgs.runCommand (name + ".dhall") env' ''
|
config = hostPkgs.runCommand (name + ".dhall") env' ''
|
||||||
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
||||||
${apps.dhall.program} <<< \
|
${apps.dhall.program} <<< "${testConfig'}" > $out
|
||||||
"(${./driver-hw-config.dhall} ${testConfig})" > $out
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
iso = apps.hw-iso.function env'
|
iso = apps.hw-iso.function env' testConfig';
|
||||||
"(${./driver-hw-config.dhall} ${testConfig})";
|
|
||||||
|
|
||||||
xml = hostPkgs.runCommand (name + ".config") env' ''
|
xml = hostPkgs.runCommand (name + ".config") env' ''
|
||||||
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
||||||
${apps.render-init.program} \
|
${apps.render-init.program} "(${testConfig'}).config" > $out'';
|
||||||
"(${./driver-hw-config.dhall} ${testConfig}).config" > $out'';
|
|
||||||
|
|
||||||
sotest = hostPkgs.runCommand "hw-${name}-sotest" env' ''
|
sotest = hostPkgs.runCommand "hw-${name}-sotest" env' ''
|
||||||
cp "${testPkgs.bender}" bender
|
cp "${testPkgs.bender}" bender
|
||||||
|
|
|
@ -1,70 +1,36 @@
|
||||||
-- SPDX-License-Identifier: CC0-1.0
|
-- SPDX-License-Identifier: CC0-1.0
|
||||||
let Genode = env:DHALL_GENODE
|
let Genode = env:DHALL_GENODE
|
||||||
|
|
||||||
let Prelude = Genode.Prelude
|
|
||||||
|
|
||||||
in λ(boot : Genode.Boot.Type)
|
in λ(boot : Genode.Boot.Type)
|
||||||
→ let child =
|
→ { config =
|
||||||
{ mapKey = "test", mapValue = Genode.Init.toStart boot.config }
|
Genode.Init::{
|
||||||
|
, verbose = True
|
||||||
in { config =
|
, defaultRoutes =
|
||||||
Genode.Init::{
|
Genode.Init.default.defaultRoutes
|
||||||
, verbose = True
|
# [ Genode.ServiceRoute.child "Timer" "timer" ]
|
||||||
, defaultRoutes =
|
, children =
|
||||||
Genode.Init.default.defaultRoutes
|
[ { mapKey = "timer"
|
||||||
# [ Genode.ServiceRoute.child "Timer" "timer" ]
|
, mapValue =
|
||||||
, children =
|
Genode.Init.Start::{
|
||||||
[ { mapKey = "timer"
|
, binary = "linux_timer_drv"
|
||||||
, mapValue =
|
, resources = { caps = 96, ram = Genode.units.MiB 1 }
|
||||||
Genode.Init.Start::{
|
, provides = [ "Timer" ]
|
||||||
, binary = "linux_timer_drv"
|
|
||||||
, resources = { caps = 96, ram = Genode.units.MiB 1 }
|
|
||||||
, provides = [ "Timer" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
, { mapKey = "harness"
|
}
|
||||||
, mapValue =
|
, { mapKey = "harness"
|
||||||
Genode.Init.Start::{
|
, mapValue = Genode.Init.toStart boot.config
|
||||||
, 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.core-linux
|
||||||
|
, manifest.base-linux.bin.ld
|
||||||
|
, manifest.base-linux.bin.linux_timer_drv
|
||||||
|
, manifest.os.bin.init
|
||||||
|
]
|
||||||
|
# boot.rom
|
||||||
|
: Genode.Prelude.Map.Type Text Genode.Boot.Rom
|
||||||
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ let
|
||||||
set env(XDG_CACHE_HOME) /tmp
|
set env(XDG_CACHE_HOME) /tmp
|
||||||
|
|
||||||
exec ${apps.linux-image.program} \
|
exec ${apps.linux-image.program} \
|
||||||
${./driver-linux-config.dhall} ${testConfig}
|
${./driver-linux-config.dhall} (${./sotest-wrapper.dhall} ${testConfig})
|
||||||
|
|
||||||
spawn ./core-linux
|
spawn ./core-linux
|
||||||
wait_for_output $wait_for_re $timeout_value $spawn_id
|
wait_for_output $wait_for_re $timeout_value $spawn_id
|
||||||
|
|
|
@ -2,71 +2,37 @@
|
||||||
|
|
||||||
let Genode = env:DHALL_GENODE
|
let Genode = env:DHALL_GENODE
|
||||||
|
|
||||||
let Prelude = Genode.Prelude
|
|
||||||
|
|
||||||
in λ(boot : Genode.Boot.Type)
|
in λ(boot : Genode.Boot.Type)
|
||||||
→ let child =
|
→ { config =
|
||||||
{ mapKey = "test", mapValue = Genode.Init.toStart boot.config }
|
Genode.Init::{
|
||||||
|
, defaultRoutes =
|
||||||
in { config =
|
Genode.Init.default.defaultRoutes
|
||||||
Genode.Init::{
|
# [ Genode.ServiceRoute.parent "IO_MEM"
|
||||||
, defaultRoutes =
|
, Genode.ServiceRoute.parent "IO_PORT"
|
||||||
Genode.Init.default.defaultRoutes
|
, Genode.ServiceRoute.parent "IRQ"
|
||||||
# [ Genode.ServiceRoute.parent "IO_MEM"
|
, Genode.ServiceRoute.child "Timer" "timer"
|
||||||
, Genode.ServiceRoute.parent "IO_PORT"
|
]
|
||||||
, Genode.ServiceRoute.parent "IRQ"
|
, children =
|
||||||
, Genode.ServiceRoute.child "Timer" "timer"
|
[ { mapKey = "timer"
|
||||||
]
|
, mapValue =
|
||||||
, children =
|
Genode.Init.Start::{
|
||||||
[ { mapKey = "timer"
|
, binary = "nova_timer_drv"
|
||||||
, mapValue =
|
, resources = { caps = 96, ram = Genode.units.MiB 1 }
|
||||||
Genode.Init.Start::{
|
, provides = [ "Timer" ]
|
||||||
, binary = "nova_timer_drv"
|
|
||||||
, resources = { caps = 96, ram = Genode.units.MiB 1 }
|
|
||||||
, provides = [ "Timer" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
, { mapKey = "harness"
|
}
|
||||||
, mapValue =
|
, { mapKey = "harness"
|
||||||
Genode.Init.Start::{
|
, mapValue = Genode.Init.toStart boot.config
|
||||||
, 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-nova.lib.ld
|
|
||||||
, manifest.base-nova.bin.nova_timer_drv
|
|
||||||
, manifest.os.bin.init
|
|
||||||
, manifest.sotest-producer.bin.sotest-harness
|
|
||||||
]
|
|
||||||
# boot.rom
|
|
||||||
}
|
}
|
||||||
|
, rom =
|
||||||
|
let manifest = env:MANIFEST
|
||||||
|
|
||||||
|
in Genode.Boot.toRomPaths
|
||||||
|
[ manifest.base-nova.lib.ld
|
||||||
|
, manifest.base-nova.bin.nova_timer_drv
|
||||||
|
, manifest.os.bin.init
|
||||||
|
]
|
||||||
|
# boot.rom
|
||||||
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ let
|
||||||
, env ? { }, ... # TODO: remove ...
|
, env ? { }, ... # TODO: remove ...
|
||||||
}@t:
|
}@t:
|
||||||
let
|
let
|
||||||
|
testConfig' = "${./driver-nova-config.dhall} (${./sotest-wrapper.dhall} ${testConfig})";
|
||||||
manifest = lib.mergeManifests (with testPkgs;
|
manifest = lib.mergeManifests (with testPkgs;
|
||||||
[ base-nova genode.os sotest-producer ]
|
[ base-nova genode.os sotest-producer ]
|
||||||
++ testInputs);
|
++ testInputs);
|
||||||
|
@ -49,8 +50,7 @@ let
|
||||||
MANIFEST = manifest;
|
MANIFEST = manifest;
|
||||||
} // env;
|
} // env;
|
||||||
|
|
||||||
image = apps.nova-image.function env'
|
image = apps.nova-image.function env' testConfig';
|
||||||
"${./driver-nova-config.dhall} ${testConfig}";
|
|
||||||
|
|
||||||
baseSetup = ''
|
baseSetup = ''
|
||||||
##
|
##
|
||||||
|
@ -91,9 +91,10 @@ let
|
||||||
|
|
||||||
global env
|
global env
|
||||||
global spawn_id
|
global spawn_id
|
||||||
|
set TEST_MIB [expr ($env(TEST_RAM) / 1048576) + 24]
|
||||||
spawn ${hostPkgs.qemu_test}/bin/qemu-system-x86_64 \
|
spawn ${hostPkgs.qemu_test}/bin/qemu-system-x86_64 \
|
||||||
-machine q35 -serial mon:stdio -nographic \
|
-machine q35 -serial mon:stdio -nographic \
|
||||||
-m size=[expr ($env(TEST_RAM) / 1048576) + 16] \
|
-m size=$TEST_MIB \
|
||||||
-kernel "${testPkgs.bender}" \
|
-kernel "${testPkgs.bender}" \
|
||||||
-initrd "${testPkgs.NOVA}/hypervisor-x86_64 arg=iommu novpid serial,${image}"
|
-initrd "${testPkgs.NOVA}/hypervisor-x86_64 arg=iommu novpid serial,${image}"
|
||||||
wait_for_output $wait_for_re $timeout_value $spawn_id
|
wait_for_output $wait_for_re $timeout_value $spawn_id
|
||||||
|
@ -107,7 +108,7 @@ let
|
||||||
driver = with hostPkgs;
|
driver = with hostPkgs;
|
||||||
buildPackages.runCommand "genode-test-driver-${name}" {
|
buildPackages.runCommand "genode-test-driver-${name}" {
|
||||||
buildInputs = [ makeWrapper expect ];
|
buildInputs = [ makeWrapper expect ];
|
||||||
inherit baseSetup testConfig testScript;
|
inherit baseSetup testScript;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
testName = name;
|
testName = name;
|
||||||
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
||||||
|
@ -116,7 +117,7 @@ let
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
echo "$testScript" > $out/test-script
|
echo "$testScript" > $out/test-script
|
||||||
echo "$baseSetup" > $out/base-setup
|
echo "$baseSetup" > $out/base-setup
|
||||||
eval $(${apps.dhall-to-bash.program} --declare "TEST_RAM" <<< "${./boot-ram.dhall} ${testConfig}")
|
eval $(${apps.dhall-to-bash.program} --declare "TEST_RAM" <<< "${./boot-ram.dhall} (${testConfig'})")
|
||||||
ln -s ${testDriver}/bin/genode-test-driver $out/bin/
|
ln -s ${testDriver}/bin/genode-test-driver $out/bin/
|
||||||
wrapProgram $out/bin/genode-test-driver \
|
wrapProgram $out/bin/genode-test-driver \
|
||||||
--set testScript "$testScript" \
|
--set testScript "$testScript" \
|
||||||
|
@ -135,17 +136,14 @@ let
|
||||||
|
|
||||||
config = hostPkgs.runCommand (name + ".dhall") env' ''
|
config = hostPkgs.runCommand (name + ".dhall") env' ''
|
||||||
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
||||||
${apps.dhall.program} <<< \
|
${apps.dhall.program} <<< "${testConfig'}" > $out
|
||||||
"(${./driver-nova-config.dhall} ${testConfig})" > $out
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
iso = apps.nova-iso.function env'
|
iso = apps.nova-iso.function env' "${testConfig'}";
|
||||||
"(${./driver-nova-config.dhall} ${testConfig})";
|
|
||||||
|
|
||||||
xml = hostPkgs.runCommand (name + ".config") env' ''
|
xml = hostPkgs.runCommand (name + ".config") env' ''
|
||||||
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
||||||
${apps.render-init.program} \
|
${apps.render-init.program} "(${testConfig'}).config" > $out'';
|
||||||
"(${./driver-nova-config.dhall} ${testConfig}).config" > $out'';
|
|
||||||
|
|
||||||
sotest = hostPkgs.runCommand "nova-${name}-sotest" env' ''
|
sotest = hostPkgs.runCommand "nova-${name}-sotest" env' ''
|
||||||
cp "${testPkgs.bender}" bender
|
cp "${testPkgs.bender}" bender
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
-- SPDX-License-Identifier: CC0-1.0
|
||||||
|
let Genode = env:DHALL_GENODE
|
||||||
|
|
||||||
|
let Prelude = Genode.Prelude
|
||||||
|
|
||||||
|
in λ(boot : Genode.Boot.Type)
|
||||||
|
→ let child =
|
||||||
|
{ mapKey = "test", mapValue = Genode.Init.toStart boot.config }
|
||||||
|
|
||||||
|
in { config =
|
||||||
|
Genode.Init::{
|
||||||
|
, verbose = True
|
||||||
|
, children =
|
||||||
|
toMap
|
||||||
|
{ harness =
|
||||||
|
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.sotest-producer.bin.sotest-harness ]
|
||||||
|
# boot.rom
|
||||||
|
: Genode.Prelude.Map.Type Text Genode.Boot.Rom
|
||||||
|
}
|
Loading…
Reference in New Issue