diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-06-15 16:59:21 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-09-24 17:38:08 +0100 |
commit | b0c781cc4136e4678db1864875750c916b78ad33 (patch) | |
tree | 9178479f4268febe7be869f899ce8bc60ba774b5 /nixos/lib/testing-python.nix | |
parent | 5727fd3e6f17684eb8bace334564cda302077524 (diff) |
nixos/testing: Move entrypoint to nixos/lib + doc
Diffstat (limited to 'nixos/lib/testing-python.nix')
-rw-r--r-- | nixos/lib/testing-python.nix | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 1c331a3c5162b..e72e5d476bfa6 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -12,6 +12,10 @@ with pkgs; +let + nixos-lib = import ./default.nix { inherit (pkgs) lib; }; +in + rec { inherit pkgs; @@ -166,26 +170,15 @@ rec { ${lib.optionalString (interactive) "--add-flags --interactive"} ''); - evalTest = module: lib.evalModules { modules = testModules ++ [ module ]; }; - runTest = module: (evalTest module).config.run; - - testModules = [ - ./testing/driver.nix - ./testing/interactive.nix - ./testing/legacy.nix - ./testing/meta.nix - ./testing/name.nix - ./testing/network.nix - ./testing/nodes.nix - ./testing/pkgs.nix - ./testing/run.nix - ./testing/testScript.nix - { - config = { - hostPkgs = pkgs; - }; - } - ]; + evalTest = module: nixos-lib.evalTest { imports = [ extraTestModule module ]; }; + runTest = module: nixos-lib.runTest { imports = [ extraTestModule module ]; }; + + extraTestModule = { + config = { + hostPkgs = pkgs; + minimalResult = hydra; + }; + }; # Make a full-blown test makeTest = |