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-04-13 20:26:01 +02:00
|
|
|
run_genode_until {SOTEST END} 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-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 = [
|
|
|
|
{
|
2020-04-13 20:26:01 +02:00
|
|
|
name = "multi";
|
|
|
|
testConfig = "${./.}/solo5.dhall";
|
|
|
|
testInputs = map genodeMake [ "app/ping" ] ++ (map genodeDepot [
|
|
|
|
"ram_block"
|
|
|
|
"nic_bridge"
|
|
|
|
"nic_loopback"
|
|
|
|
"sequence"
|
|
|
|
"rtc_drv"
|
|
|
|
]);
|
2019-10-22 19:20:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "ssp";
|
2020-04-13 20:26:01 +02:00
|
|
|
testConfig = ./ssp.dhall;
|
2019-10-22 19:20:26 +02:00
|
|
|
testScript = ''
|
|
|
|
run_genode_until {Error: stack protector check failed} 30
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|
2020-04-13 20:26:01 +02:00
|
|
|
];
|
2019-10-22 19:20:26 +02:00
|
|
|
|
|
|
|
in mkTests tests
|