2
0
Fork 0
genodepkgs/tests/default.nix

72 lines
1.9 KiB
Nix
Raw Normal View History

2020-01-17 01:24:34 +01:00
# SPDX-License-Identifier: CC0-1.0
2019-10-03 19:50:34 +02:00
let
2020-01-14 12:16:02 +01:00
tests = call:
{
2020-01-22 12:21:39 +01:00
log = call ./log.nix { };
2020-01-14 12:16:02 +01:00
signal = call ./signal.nix { };
} // call ./solo5 { };
2020-01-17 19:27:04 +01:00
in { self, apps, system, localSystem, crossSystem, genodepkgs, nixpkgs
, genode-depot, lib }:
2019-10-03 19:50:34 +02:00
let
buildPkgs = import nixpkgs { system = localSystem; };
2020-01-25 18:14:18 +01:00
depot = genode-depot.packages.${system};
testPkgs = genodepkgs;
2019-10-03 19:50:34 +02:00
addManifest = drv:
drv // {
manifest = buildPkgs.runCommand "${drv.name}.dhall" { inherit drv; } ''
set -eu
echo -n '[' >> $out
find $drv/ -type f -printf ',{mapKey= "%f",mapValue="%p"}' >> $out
echo -n ']' >> $out
'';
};
2020-03-22 06:11:46 +01:00
linux =
(call: ((tests call) // { block_router = call ./block_router.nix { }; }))
(import ./driver-linux.nix {
inherit apps testPkgs buildPkgs lib depot addManifest;
2020-03-22 06:11:46 +01:00
}).callTest;
2019-11-05 17:38:47 +01:00
nova = (call:
((tests call) // {
2020-02-27 18:17:14 +01:00
driver_manager = call ./driver_manager.nix { };
noux = call ./noux.nix { };
pci = call ./pci.nix { };
rtc = call ./rtc.nix { };
})) (import ./driver-nova.nix {
inherit apps system testPkgs buildPkgs lib depot addManifest;
2019-11-05 17:38:47 +01:00
}).callTest;
hw = (call:
((tests call) // {
# noux = call ./noux.nix { };
pci = call ./pci.nix { };
rtc = call ./rtc.nix { };
})) (import ./driver-hw.nix {
inherit apps system testPkgs buildPkgs lib depot addManifest;
}).callTest;
2019-11-05 17:38:47 +01:00
testsToList = tests:
map (test: {
inherit (test) name;
value = test;
}) (builtins.attrValues tests);
2020-02-19 14:27:24 +01:00
hw-sotest = map ({ name, value }: {
name = name + "-sotest";
value = value.sotest;
}) (testsToList hw);
nova-sotest = map ({ name, value }: {
name = name + "-sotest";
value = value.sotest;
}) (testsToList nova);
2020-01-20 18:29:56 +01:00
in with builtins;
listToAttrs ((concatLists (map (testsToList) [ linux hw nova ])) ++ hw-sotest
2020-02-27 18:17:14 +01:00
++ nova-sotest)