From abe218950c779fd1c98034356d3b324d66a0d30a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 14 Apr 2014 14:02:44 +0200 Subject: Make it easier to run the tests You can now run a test in the nixos/tests directory directly using nix-build, e.g. $ nix-build '' -A test This gets rid of having to add the test to nixos/tests/default.nix. (Of course, you still need to add it to nixos/release.nix if you want Hydra to run the test.) --- nixos/tests/login.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'nixos/tests/login.nix') diff --git a/nixos/tests/login.nix b/nixos/tests/login.nix index ed7d97867179..0a7d25c37aca 100644 --- a/nixos/tests/login.nix +++ b/nixos/tests/login.nix @@ -1,8 +1,11 @@ -config: { pkgs, ... }: +import ./make-test.nix ({ pkgs, latestKernel ? false, ... }: { - machine = config; + machine = + { config, pkgs, lib, ... }: + { boot.kernelPackages = lib.mkIf latestKernel pkgs.linuxPackages_latest; + }; testScript = '' @@ -58,4 +61,4 @@ config: { pkgs, ... }: }; ''; -} +}) -- cgit 1.4.1