1 { system ? builtins.currentSystem
3 , pkgs ? import ../../.. { inherit system config; }
5 , kernelVersionsToTest ? [ "4.19" "5.4" "5.10" "5.15" "6.1" "latest" ]
8 # For quickly running a test, the nixosTests.lvm2.lvm-thinpool-linux-latest attribute is recommended
10 tests = let callTest = p: lib.flip (import p) { inherit system pkgs; }; in {
11 thinpool = { test = callTest ./thinpool.nix; kernelFilter = lib.id; };
12 # we would like to test all versions, but the kernel module currently does not compile against the other versions
13 vdo = { test = callTest ./vdo.nix; kernelFilter = lib.filter (v: v == "5.15"); };
18 test = callTest ./systemd-stage-1.nix;
19 kernelFilter = lib.id;
22 thinpool-sd-stage-1 = {
23 test = callTest ./systemd-stage-1.nix;
24 kernelFilter = lib.id;
28 test = callTest ./systemd-stage-1.nix;
29 kernelFilter = lib.filter (v: v == "5.15");
35 lib.filter (x: x.value != {}) (
36 lib.flip lib.concatMap kernelVersionsToTest (version:
38 v' = lib.replaceStrings [ "." ] [ "_" ] version;
40 lib.flip lib.mapAttrsToList tests (name: t:
41 lib.nameValuePair "lvm-${name}-linux-${v'}" (lib.optionalAttrs (builtins.elem version (t.kernelFilter kernelVersionsToTest)) (t.test ({ kernelPackages = pkgs."linuxPackages_${v'}"; } // builtins.removeAttrs t [ "test" "kernelFilter" ])))