sigil/tests/log.nix
Emery Hemingway 2afd2d08cc nixos: add genode.init.children.<…>.binary option
Require that all init children declared by Nix be declared with
an absolute path to the program binary.
2021-02-16 15:46:14 +01:00

31 lines
815 B
Nix

{
name = "log";
machine = { pkgs, ... }: {
genode.init.children.log = {
binary = "${pkgs.genodePackages.test-log}/bin/test-log";
configFile = pkgs.writeText "test-log.dhall" ''
let Genode =
env:DHALL_GENODE
? https://git.sr.ht/~ehmry/dhall-genode/blob/master/package.dhall
let Child = Genode.Init.Child
in λ(binary : Text)
Child.flat
Child.Attributes::{
, binary
, exitPropagate = True
, resources = Genode.Init.Resources::{
, caps = 500
, ram = Genode.units.MiB 10
}
}
'';
};
};
testScript = ''
start_all()
machine.wait_until_serial_output("Test done.")
'';
}