89 lines
1.7 KiB
Nix
89 lines
1.7 KiB
Nix
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
{ testEnv, pkgs, ... }:
|
|
with pkgs;
|
|
|
|
let
|
|
defaultScript = ''
|
|
run_genode_until {SUCCESS} 30
|
|
'';
|
|
|
|
mkTest' = { name, testConfig, testScript ? defaultScript, ... }@attrs:
|
|
testEnv.mkTest (attrs // {
|
|
name = "solo5-" + name;
|
|
inherit testScript;
|
|
testInputs = [ pkgs.solo5 pkgs.solo5.tests ];
|
|
testConfig = "(${./boot-wrapper.dhall} ${testConfig})";
|
|
});
|
|
|
|
applyMkTest = x: {
|
|
inherit (x) name;
|
|
value = mkTest' x;
|
|
};
|
|
|
|
mkTests = testList: builtins.listToAttrs (map applyMkTest testList);
|
|
|
|
toSimple = name:
|
|
"(${./simple.dhall} (env:MANIFEST).solo5-tests.bin.solo5-test_${name})";
|
|
|
|
tests = [
|
|
{
|
|
name = "blk";
|
|
testConfig = ./blk.dhall;
|
|
}
|
|
|
|
{
|
|
name = "fpu";
|
|
testConfig = toSimple "fpu";
|
|
}
|
|
|
|
{
|
|
name = "globals";
|
|
testConfig = toSimple "globals";
|
|
}
|
|
|
|
{
|
|
name = "hello";
|
|
testConfig = toSimple "hello";
|
|
}
|
|
|
|
{
|
|
name = "net";
|
|
testConfig = ./net.dhall;
|
|
testScript = ''
|
|
run_genode_until {child "init" exited with exit value 0} 30
|
|
'';
|
|
qemuMem = 64;
|
|
}
|
|
|
|
{
|
|
name = "net_2if";
|
|
testConfig = ./net_2if.dhall;
|
|
testScript = ''
|
|
run_genode_until {child "init" exited with exit value 0} 30
|
|
'';
|
|
qemuMem = 64;
|
|
}
|
|
|
|
{
|
|
name = "quiet";
|
|
testConfig = toSimple "quiet";
|
|
}
|
|
|
|
{
|
|
name = "ssp";
|
|
testConfig = toSimple "ssp";
|
|
testScript = ''
|
|
run_genode_until {Error: stack protector check failed} 30
|
|
'';
|
|
}
|
|
|
|
] ++ (testEnv.lib.optional (!testEnv.isLinux) {
|
|
name = "time";
|
|
testConfig = ./time.dhall;
|
|
}
|
|
|
|
);
|
|
|
|
in mkTests tests
|