mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
nixosTests.allDrivers: Move logic to all-packages.nix
Bring it in line with release.nix
This commit is contained in:
parent
9a995f5c6a
commit
51224f522f
2 changed files with 11 additions and 17 deletions
|
@ -27,21 +27,7 @@ let
|
||||||
};
|
};
|
||||||
evalMinimalConfig = module: nixosLib.evalModules { modules = [ module ]; };
|
evalMinimalConfig = module: nixosLib.evalModules { modules = [ module ]; };
|
||||||
|
|
||||||
allDrivers = getDrivers tests;
|
in {
|
||||||
|
|
||||||
getDrivers = ts:
|
|
||||||
if isDerivation ts
|
|
||||||
then ts.driver or null
|
|
||||||
else if isAttrs ts
|
|
||||||
then recurseIntoAttrs (mapAttrs (k: getDrivers) ts)
|
|
||||||
else null;
|
|
||||||
|
|
||||||
tests = {
|
|
||||||
|
|
||||||
# for typechecking of the scripts and evaluation of
|
|
||||||
# the nodes, without running VMs.
|
|
||||||
inherit allDrivers;
|
|
||||||
|
|
||||||
_3proxy = handleTest ./3proxy.nix {};
|
_3proxy = handleTest ./3proxy.nix {};
|
||||||
acme = handleTest ./acme.nix {};
|
acme = handleTest ./acme.nix {};
|
||||||
adguardhome = handleTest ./adguardhome.nix {};
|
adguardhome = handleTest ./adguardhome.nix {};
|
||||||
|
@ -634,5 +620,4 @@ let
|
||||||
zookeeper = handleTest ./zookeeper.nix {};
|
zookeeper = handleTest ./zookeeper.nix {};
|
||||||
zrepl = handleTest ./zrepl.nix {};
|
zrepl = handleTest ./zrepl.nix {};
|
||||||
zsh-history = handleTest ./zsh-history.nix {};
|
zsh-history = handleTest ./zsh-history.nix {};
|
||||||
};
|
}
|
||||||
in tests
|
|
||||||
|
|
|
@ -133,10 +133,19 @@ with pkgs;
|
||||||
|
|
||||||
### Push NixOS tests inside the fixed point
|
### Push NixOS tests inside the fixed point
|
||||||
|
|
||||||
|
# See also allTestsForSystem in nixos/release.nix
|
||||||
nixosTests = import ../../nixos/tests/all-tests.nix {
|
nixosTests = import ../../nixos/tests/all-tests.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
system = stdenv.hostPlatform.system;
|
system = stdenv.hostPlatform.system;
|
||||||
callTest = t: t.test;
|
callTest = t: t.test;
|
||||||
|
} // {
|
||||||
|
# for typechecking of the scripts and evaluation of
|
||||||
|
# the nodes, without running VMs.
|
||||||
|
allDrivers = import ../../nixos/tests/all-tests.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
system = stdenv.hostPlatform.system;
|
||||||
|
callTest = t: t.test.driver;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
### BUILD SUPPORT
|
### BUILD SUPPORT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue