1{ system ? builtins.currentSystem
2, config ? { }
3, pkgs ? import ../../.. { inherit system config; }
4, kernelVersionsToTest ? [ "5.4" "latest" ]
5}:
6
7with pkgs.lib;
8
9let
10 tests = let callTest = p: args: import p ({ inherit system pkgs; } // args); in {
11 basic = callTest ./basic.nix;
12 namespaces = callTest ./namespaces.nix;
13 wg-quick = callTest ./wg-quick.nix;
14 wg-quick-nftables = args: callTest ./wg-quick.nix ({ nftables = true; } // args);
15 generated = callTest ./generated.nix;
16 };
17in
18
19listToAttrs (
20 flip concatMap kernelVersionsToTest (version:
21 let
22 v' = replaceStrings [ "." ] [ "_" ] version;
23 in
24 flip mapAttrsToList tests (name: test:
25 nameValuePair "wireguard-${name}-linux-${v'}" (test { kernelPackages = pkgs."linuxPackages_${v'}"; })
26 )
27 )
28)