nixos/testing: Move entrypoint to nixos/lib + doc
This commit is contained in:
@@ -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;
|
||||
evalTest = module: nixos-lib.evalTest { imports = [ extraTestModule module ]; };
|
||||
runTest = module: nixos-lib.runTest { imports = [ extraTestModule module ]; };
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
];
|
||||
extraTestModule = {
|
||||
config = {
|
||||
hostPkgs = pkgs;
|
||||
minimalResult = hydra;
|
||||
};
|
||||
};
|
||||
|
||||
# Make a full-blown test
|
||||
makeTest =
|
||||
|
||||
Reference in New Issue
Block a user