2
0
genodepkgs/tests/solo5/default.nix
Emery Hemingway 6d6d585f0f Refactor of packaging and testing
- Remove manifests from Dhall configurations and mix all
   test inputs to generate test ROM maps.

 - All loader and timer drivers are name ld.lib.so and timer_drv.

 - Replace packages of multiple Genode Labs targets with functions
   to build individual targets. These packages are not explicitly
   specified unless they require inputs from the source ports or
   extra nativeBuildInputs.

 - Add support for building from Genode world repository.
2020-03-18 19:39:57 +05:30

92 lines
1.8 KiB
Nix

# SPDX-License-Identifier: CC0-1.0
{ testEnv, pkgs, ... }:
with pkgs;
let
defaultScript = ''
run_genode_until {SUCCESS} 30
'';
mkTest' = { name, testConfig, testScript ? defaultScript, testInputs ? [ ]
, ... }@attrs:
testEnv.mkTest (attrs // {
name = "solo5-" + name;
inherit testConfig testScript;
testInputs = [ pkgs.solo5 pkgs.solo5.tests ] ++ testInputs;
});
applyMkTest = x: {
inherit (x) name;
value = mkTest' x;
};
mkTests = testList: builtins.listToAttrs (map applyMkTest testList);
toSimple = name: ''(${./simple.dhall} \"solo5-test_${name}\")'';
makeGenode = pkgs.genodeSources.make;
tests = [
{
name = "blk";
testConfig = ./blk.dhall;
testInputs = [ (makeGenode "server/ram_block") ];
}
{
name = "fpu";
testConfig = toSimple "fpu";
}
{
name = "globals";
testConfig = toSimple "globals";
}
{
name = "hello";
testConfig = toSimple "hello";
}
{
name = "net";
testConfig = ./net.dhall;
testInputs =
map makeGenode [ "app/ping" "server/nic_bridge" "server/nic_loopback" ];
}
{
name = "net_2if";
testConfig = ./net_2if.dhall;
testInputs = map makeGenode [
"app/ping"
"app/sequence"
"server/nic_bridge"
"server/nic_loopback"
];
}
{
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;
testInputs = [ (makeGenode "drivers/rtc") ];
}
);
in mkTests tests