2022-05-20 18:11:20 +02:00
|
|
|
{ lib, system, localSystem, crossSystem, hostPkgs, testPkgs, modulesPath }:
|
2019-10-03 19:50:34 +02:00
|
|
|
|
|
|
|
let
|
2021-03-09 21:43:23 +01:00
|
|
|
testingPython =
|
|
|
|
# Mostly lifted from Nixpkgs.
|
|
|
|
import ./lib/testing-python.nix;
|
2020-11-01 20:21:27 +01:00
|
|
|
|
2021-03-09 21:43:23 +01:00
|
|
|
testSpace =
|
|
|
|
# Run all tests on all defined Genode platforms
|
|
|
|
lib.cartesianProductOfSets {
|
2020-05-31 11:35:24 +02:00
|
|
|
|
2021-03-09 21:43:23 +01:00
|
|
|
test = map (p: import p) [
|
|
|
|
./ahci.nix
|
|
|
|
./bash.nix
|
2021-12-10 11:07:57 +01:00
|
|
|
./graphics.nix
|
2021-03-09 21:43:23 +01:00
|
|
|
./hello.nix
|
|
|
|
./log.nix
|
|
|
|
./nim.nix
|
2023-09-28 12:46:22 +02:00
|
|
|
./syndicate.nix
|
2021-12-10 11:07:57 +01:00
|
|
|
./tor.nix
|
2021-03-20 19:47:57 +01:00
|
|
|
./usb.nix
|
2021-03-09 21:43:23 +01:00
|
|
|
./vmm_x86.nix
|
2021-01-30 11:16:14 +01:00
|
|
|
];
|
|
|
|
|
2021-03-09 21:43:23 +01:00
|
|
|
core = builtins.filter (core:
|
2023-06-16 11:09:09 +02:00
|
|
|
builtins.any (x: x == testPkgs.stdenv.hostPlatform.system) core.platforms) [
|
2021-03-09 21:43:23 +01:00
|
|
|
/* # Need to fix the QEMU boot parameters?
|
|
|
|
{
|
|
|
|
prefix = "hw-pc-";
|
|
|
|
testingPython = testingPython {
|
2022-05-20 18:11:20 +02:00
|
|
|
inherit lib system localSystem crossSystem hostPkgs testPkgs modulesPath;
|
2021-03-09 21:43:23 +01:00
|
|
|
extraConfigurations = [ ../nixos-modules/base-hw-pc.nix ];
|
|
|
|
};
|
|
|
|
specs = [ "x86" "hw" ];
|
|
|
|
platforms = [ "x86_64-genode" ];
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
/* # Need to fix the QEMU boot parameters?
|
|
|
|
{
|
|
|
|
prefix = "hw-virt_qemu-";
|
|
|
|
testingPython = testingPython {
|
2022-05-20 18:11:20 +02:00
|
|
|
inherit lib system localSystem crossSystem hostPkgs testPkgs modulesPath;
|
2021-03-09 21:43:23 +01:00
|
|
|
extraConfigurations = [ ../nixos-modules/base-hw-virt_qemu.nix ];
|
|
|
|
};
|
|
|
|
specs = [ "aarch64" "hw" ];
|
|
|
|
platforms = [ "aarch64-genode" ];
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
prefix = "nova-";
|
|
|
|
testingPython = testingPython {
|
2022-05-20 18:11:20 +02:00
|
|
|
inherit lib system localSystem crossSystem hostPkgs testPkgs
|
|
|
|
modulesPath;
|
2021-03-09 21:43:23 +01:00
|
|
|
extraConfigurations = [ ../nixos-modules/nova.nix ];
|
|
|
|
};
|
|
|
|
specs = [ "x86" "nova" ];
|
|
|
|
platforms = [ "x86_64-genode" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
2020-05-30 20:50:44 +02:00
|
|
|
|
2020-05-31 11:35:24 +02:00
|
|
|
testList = let
|
2021-01-30 11:16:14 +01:00
|
|
|
f = { core, test }:
|
2020-05-30 20:50:44 +02:00
|
|
|
if (test.constraints or (_: true)) core.specs then {
|
|
|
|
name = core.prefix + test.name;
|
2020-11-01 20:21:27 +01:00
|
|
|
value = core.testingPython.makeTest test;
|
2020-05-31 11:35:24 +02:00
|
|
|
} else
|
|
|
|
null;
|
2021-01-30 11:16:14 +01:00
|
|
|
in map f testSpace;
|
2020-05-31 11:35:24 +02:00
|
|
|
|
|
|
|
in builtins.listToAttrs (builtins.filter (_: _ != null) testList)
|