From 481ef8ddd64c8bac88cfd12fbf83f6569a355b6b Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 3 Jun 2022 14:34:29 +0200 Subject: [PATCH] nixosTests: Add allDrivers for development purposes --- nixos/tests/all-tests.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e61798676a0d..f9e32592e95b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -26,8 +26,22 @@ let featureFlags.minimalModules = {}; }; evalMinimalConfig = module: nixosLib.evalModules { modules = [ module ]; }; -in -{ + + allDrivers = getDrivers tests; + + 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 {}; acme = handleTest ./acme.nix {}; adguardhome = handleTest ./adguardhome.nix {}; @@ -620,4 +634,5 @@ in zookeeper = handleTest ./zookeeper.nix {}; zrepl = handleTest ./zrepl.nix {}; zsh-history = handleTest ./zsh-history.nix {}; -} +}; +in tests