add CI "all" target

This commit is contained in:
Daniel Barlow 2024-10-06 16:39:24 +01:00
parent ca9efc4b26
commit f8c579b41e
3 changed files with 12 additions and 14 deletions

5
ci.nix
View File

@ -70,4 +70,7 @@ let
''; '';
}; };
}; };
in (genAttrs devices for-device) # tests # jobs in jobs //
{
all = pkgs.lib.collect pkgs.lib.isDerivation jobs;
}

View File

@ -232,18 +232,13 @@ Running tests
************* *************
You can run all of the tests by evaluating :file:`ci.nix`, which is the You can run all of the tests by evaluating :file:`ci.nix`, which is the
input I use in Hydra. Note that it expects Nixpkgs stable `and` unstable input I use in Hydra.
as inputs, because it builds the qemu device against both.
.. code-block:: console .. code-block:: console
nix-build --argstr liminix `pwd` --arg nixpkgs "<nixpkgs>" \ nix-build -I liminix=`pwd` ci.nix -A pppoe # run one job
--argstr unstable `pwd`/../unstable-nixpkgs/ ci.nix nix-build -I liminix=`pwd` ci.nix -A all # run all jobs
To run a single named test, use the ``-A`` flag. For example, ``-A pppoe``
Troubleshooting Troubleshooting
*************** ***************

View File

@ -1,9 +1,9 @@
let let
overlay = import <liminix/overlay.nix>; overlay = import <liminix/overlay.nix>;
nixpkgs = import <nixpkgs> { overlays = [overlay]; }; pkgs = import <nixpkgs> { overlays = [overlay]; };
fixture = nixpkgs.callPackage ./fixture.nix {}; fixture = pkgs.callPackage ./fixture.nix {};
in nixpkgs.runCommand "check" { in pkgs.runCommand "check" {
nativeBuildInputs = with <nixpkgs>; [ squashfsTools qprint ] ; nativeBuildInputs = with pkgs; [ squashfsTools qprint ] ;
} '' } ''
set -e set -e
diff ${fixture} ${./result.expected} diff ${fixture} ${./result.expected}