diff --git a/tests/default.nix b/tests/default.nix index 0a57576..9b24a30 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -13,7 +13,7 @@ in { self, apps, system, localSystem, crossSystem, genodepkgs, nixpkgs let hostPkgs = import nixpkgs { system = localSystem; }; - depot = builtins.getAttr crossSystem genode-depot.packages; + depot = genode-depot.packages.${system}; testPkgs = genodepkgs; linux = tests (import ./driver-linux.nix { @@ -22,6 +22,7 @@ let nova = (call: ((tests call) // { + noux = call ./noux.nix { }; pci = call ./pci.nix { }; rtc = call ./rtc.nix { }; })) (import ./driver-nova.nix { diff --git a/tests/driver-nova.nix b/tests/driver-nova.nix index 8d86cbc..920bc89 100644 --- a/tests/driver-nova.nix +++ b/tests/driver-nova.nix @@ -34,7 +34,9 @@ let ''; }; - mkTest = { name ? "unamed", testScript, testConfig, testInputs ? [ ] + defaultScript = ''run_genode_until {child "init" exited with exit value 0} 60''; + + mkTest = { name ? "unamed", testScript ? defaultScript, testConfig, testInputs ? [ ] , env ? { }, qemuMem ? 32, ... # TODO: remove ... }@t: let diff --git a/tests/noux.dhall b/tests/noux.dhall new file mode 100644 index 0000000..fca51b7 --- /dev/null +++ b/tests/noux.dhall @@ -0,0 +1,51 @@ +-- SPDX-License-Identifier: CC0-1.0 + +let Genode = env:DHALL_GENODE + +in { config = + Genode.Init::{ + , verbose = True + , children = + toMap + { noux = + Genode.Init.Start::{ + , binary = "noux" + , exitPropagate = True + , resources = { caps = 500, ram = Genode.units.MiB 10 } + , routes = [ Genode.ServiceRoute.parent "Timer" ] + , config = + Some + ( Genode.Prelude.XML.text + '' + + + + + + + echo "hello world" + + + + + + + '' + ) + } + } + } + , rom = + let manifest = env:MANIFEST + + in Genode.Boot.toRomPaths + [ manifest.bash-minimal.tar.bash-minimal + , manifest.libc.lib.libc + , manifest.libc.lib.libm + , manifest.ncurses.lib.ncurses + , manifest.noux.bin.noux + , manifest.noux.lib.libc_noux + , manifest.os.lib.vfs + , manifest.posix.lib.posix + ] + } diff --git a/tests/noux.nix b/tests/noux.nix new file mode 100644 index 0000000..6fc3ff3 --- /dev/null +++ b/tests/noux.nix @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: CC0-1.0 + +{ testEnv, pkgs, depot, ... }: +with pkgs; + +testEnv.mkTest rec { + name = "noux"; + testConfig = ./noux.dhall; + testInputs = with depot; [ + bash-minimal + libc + ncurses + noux + posix + ]; + qemuMem = 64; + meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ehmry ]; +}