2020-04-26 14:24:18 +02:00
|
|
|
{ system ? builtins.currentSystem
|
|
|
|
, config ? { }
|
|
|
|
, pkgs ? import ../../.. { inherit system config; }
|
2024-08-31 16:07:02 +02:00
|
|
|
# Test current default (LTS) and latest kernel
|
|
|
|
, kernelVersionsToTest ? [ (pkgs.lib.versions.majorMinor pkgs.linuxPackages.kernel.version) "latest" ]
|
2020-04-26 14:24:18 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
let
|
2022-12-26 12:26:20 +01:00
|
|
|
tests = let callTest = p: args: import p ({ inherit system pkgs; } // args); in {
|
2020-04-26 14:24:18 +02:00
|
|
|
basic = callTest ./basic.nix;
|
|
|
|
namespaces = callTest ./namespaces.nix;
|
|
|
|
wg-quick = callTest ./wg-quick.nix;
|
2022-12-26 12:26:20 +01:00
|
|
|
wg-quick-nftables = args: callTest ./wg-quick.nix ({ nftables = true; } // args);
|
2020-04-26 14:24:18 +02:00
|
|
|
generated = callTest ./generated.nix;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
listToAttrs (
|
|
|
|
flip concatMap kernelVersionsToTest (version:
|
|
|
|
let
|
|
|
|
v' = replaceStrings [ "." ] [ "_" ] version;
|
|
|
|
in
|
|
|
|
flip mapAttrsToList tests (name: test:
|
|
|
|
nameValuePair "wireguard-${name}-linux-${v'}" (test { kernelPackages = pkgs."linuxPackages_${v'}"; })
|
|
|
|
)
|
|
|
|
)
|
2019-11-28 09:32:13 +01:00
|
|
|
)
|