Add simple noux test
This commit is contained in:
parent
093430d8f9
commit
66db226f44
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
''
|
||||
<config stdin="/script" stdout="/dev/log" stderr="/dev/log">
|
||||
<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>
|
||||
</config>
|
||||
''
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
, 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
|
||||
]
|
||||
}
|
|
@ -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 ];
|
||||
}
|
Loading…
Reference in New Issue