6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
28 lines
799 B
Nix
28 lines
799 B
Nix
{ system ? builtins.currentSystem
|
|
, config ? { }
|
|
, pkgs ? import ../../.. { inherit system config; }
|
|
, kernelVersionsToTest ? [ "5.4" "latest" ]
|
|
}:
|
|
|
|
with pkgs.lib;
|
|
|
|
let
|
|
tests = let callTest = p: args: import p ({ inherit system pkgs; } // args); in {
|
|
basic = callTest ./basic.nix;
|
|
namespaces = callTest ./namespaces.nix;
|
|
wg-quick = callTest ./wg-quick.nix;
|
|
wg-quick-nftables = args: callTest ./wg-quick.nix ({ nftables = true; } // args);
|
|
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'}"; })
|
|
)
|
|
)
|
|
)
|