2020-01-17 01:24:34 +01:00
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
2020-01-14 12:16:02 +01:00
|
|
|
{ testEnv, pkgs, ... }:
|
2019-10-22 19:20:26 +02:00
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
let
|
|
|
|
defaultScript = ''
|
2020-01-23 11:39:26 +01:00
|
|
|
run_genode_until {SUCCESS} 30
|
2019-10-22 19:20:26 +02:00
|
|
|
'';
|
|
|
|
|
2020-03-10 13:33:53 +01:00
|
|
|
mkTest' = { name, testConfig, testScript ? defaultScript, testInputs ? [ ]
|
|
|
|
, ... }@attrs:
|
2019-10-22 19:20:26 +02:00
|
|
|
testEnv.mkTest (attrs // {
|
|
|
|
name = "solo5-" + name;
|
2020-03-10 13:33:53 +01:00
|
|
|
inherit testConfig testScript;
|
|
|
|
testInputs = [ pkgs.solo5 pkgs.solo5.tests ] ++ testInputs;
|
2019-10-22 19:20:26 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
applyMkTest = x: {
|
|
|
|
inherit (x) name;
|
|
|
|
value = mkTest' x;
|
|
|
|
};
|
|
|
|
|
|
|
|
mkTests = testList: builtins.listToAttrs (map applyMkTest testList);
|
|
|
|
|
2020-03-10 13:33:53 +01:00
|
|
|
toSimple = name: ''(${./simple.dhall} \"solo5-test_${name}\")'';
|
|
|
|
|
2020-04-08 15:05:26 +02:00
|
|
|
genodeDepot = pkgs.genodeSources.depot;
|
|
|
|
genodeMake = pkgs.genodeSources.make;
|
2020-01-17 19:27:04 +01:00
|
|
|
|
2019-10-22 19:20:26 +02:00
|
|
|
tests = [
|
|
|
|
{
|
|
|
|
name = "blk";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = ./blk.dhall;
|
2020-04-08 15:05:26 +02:00
|
|
|
testInputs = [ (genodeDepot "ram_block") ];
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "fpu";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = toSimple "fpu";
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "globals";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = toSimple "globals";
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "hello";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = toSimple "hello";
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "net";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = ./net.dhall;
|
2020-04-08 15:05:26 +02:00
|
|
|
testInputs = (map genodeDepot [ "nic_bridge" "nic_loopback" ])
|
|
|
|
++ (map genodeMake [ "app/ping" ]);
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "net_2if";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = ./net_2if.dhall;
|
2020-04-08 15:05:26 +02:00
|
|
|
testInputs = (map genodeDepot [ "sequence" "nic_bridge" "nic_loopback" ])
|
|
|
|
++ (map genodeMake [ "app/ping" ]);
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "quiet";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = toSimple "quiet";
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "ssp";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = toSimple "ssp";
|
2019-10-22 19:20:26 +02:00
|
|
|
testScript = ''
|
|
|
|
run_genode_until {Error: stack protector check failed} 30
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|
|
|
|
] ++ (testEnv.lib.optional (!testEnv.isLinux) {
|
|
|
|
name = "time";
|
2020-01-17 19:27:04 +01:00
|
|
|
testConfig = ./time.dhall;
|
2020-04-08 15:05:26 +02:00
|
|
|
testInputs = [ (genodeDepot "rtc_drv") ];
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
in mkTests tests
|