diff --git a/ci.nix b/ci.nix index 2e40c1b..4f63933 100644 --- a/ci.nix +++ b/ci.nix @@ -70,4 +70,7 @@ let ''; }; }; -in (genAttrs devices for-device) # tests # jobs +in jobs // + { + all = pkgs.lib.collect pkgs.lib.isDerivation jobs; + } diff --git a/doc/development.rst b/doc/development.rst index c82373c..ee73414 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -232,18 +232,13 @@ Running tests ************* 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 -as inputs, because it builds the qemu device against both. +input I use in Hydra. .. code-block:: console - nix-build --argstr liminix `pwd` --arg nixpkgs "" \ - --argstr unstable `pwd`/../unstable-nixpkgs/ ci.nix - -To run a single named test, use the ``-A`` flag. For example, ``-A pppoe`` - - - + nix-build -I liminix=`pwd` ci.nix -A pppoe # run one job + nix-build -I liminix=`pwd` ci.nix -A all # run all jobs + Troubleshooting *************** diff --git a/tests/pseudofiles/test.nix b/tests/pseudofiles/test.nix index 14df22e..7ad121b 100755 --- a/tests/pseudofiles/test.nix +++ b/tests/pseudofiles/test.nix @@ -1,9 +1,9 @@ let overlay = import ; - nixpkgs = import { overlays = [overlay]; }; - fixture = nixpkgs.callPackage ./fixture.nix {}; -in nixpkgs.runCommand "check" { - nativeBuildInputs = with ; [ squashfsTools qprint ] ; + pkgs = import { overlays = [overlay]; }; + fixture = pkgs.callPackage ./fixture.nix {}; +in pkgs.runCommand "check" { + nativeBuildInputs = with pkgs; [ squashfsTools qprint ] ; } '' set -e diff ${fixture} ${./result.expected}