3 , pkgs ? import ../.. { inherit system config; }
4 # Use a minimal kernel?
8 # !!! See comment about args in lib/modules.nix
9 , specialArgs ? throw "legacy - do not use, see error below"
10 # Modules to add to each VM
11 , extraConfigurations ? [ ]
14 nixos-lib = import ./default.nix { inherit (pkgs) lib; };
17 pkgs.lib.throwIf (args?specialArgs) ''
18 testing-python.nix: `specialArgs` is not supported anymore. If you're looking
19 for the public interface to the NixOS test framework, use `runTest`, and
21 See https://nixos.org/manual/nixos/unstable/index.html#sec-calling-nixos-tests
22 and https://nixos.org/manual/nixos/unstable/index.html#test-opt-node.specialArgs
28 evalTest = module: nixos-lib.evalTest { imports = [ extraTestModule module ]; };
29 runTest = module: nixos-lib.runTest { imports = [ extraTestModule module ]; };
37 # Make a full-blown test (legacy)
38 # For an official public interface to the tests, see
39 # https://nixos.org/manual/nixos/unstable/index.html#sec-calling-nixos-tests
45 , globalTimeout ? (60 * 60)
47 , skipTypeCheck ? false
48 # Skip linting (mainly intended for faster dev cycles)
53 pos ? # position used in error messages and for meta.position
54 (if meta.description or null != null
55 then builtins.unsafeGetAttrPos "description" meta
56 else builtins.unsafeGetAttrPos "testScript" t)
57 , extraPythonPackages ? (_ : [])
63 { _file = "makeTest parameters"; config = t; }
66 _file = "makeTest: extraConfigurations";
67 imports = extraConfigurations;
73 testConfig.test # For nix-build
74 // testConfig; # For all-tests.nix
76 simpleTest = as: (makeTest as).test;