From 3db50cc82f10334f37642aee3ffdf321ecae900d Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 1 Apr 2019 08:31:36 -0400 Subject: [PATCH] linux: Add testing test --- nixos/tests/all-tests.nix | 1 + nixos/tests/kernel-testing.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 nixos/tests/kernel-testing.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 395dc22f9682..f56aa41c9692 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -118,6 +118,7 @@ in kerberos = handleTest ./kerberos/default.nix {}; kernel-latest = handleTest ./kernel-latest.nix {}; kernel-lts = handleTest ./kernel-lts.nix {}; + kernel-testing = handleTest ./kernel-testing.nix {}; keymap = handleTest ./keymap.nix {}; knot = handleTest ./knot.nix {}; kubernetes.dns = handleTestOn ["x86_64-linux"] ./kubernetes/dns.nix {}; diff --git a/nixos/tests/kernel-testing.nix b/nixos/tests/kernel-testing.nix new file mode 100644 index 000000000000..e7495c1ef905 --- /dev/null +++ b/nixos/tests/kernel-testing.nix @@ -0,0 +1,17 @@ +import ./make-test.nix ({ pkgs, ...} : { + name = "kernel-latest"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ nequissimus ]; + }; + + machine = { pkgs, ... }: + { + boot.kernelPackages = pkgs.linuxPackages_testing; + }; + + testScript = + '' + $machine->succeed("uname -s | grep 'Linux'"); + $machine->succeed("uname -a | grep '${pkgs.linuxPackages_testing.kernel.version}'"); + ''; +})