2022-06-15 14:59:21 +00:00
|
|
|
{ lib }:
|
|
|
|
let
|
|
|
|
|
2023-04-10 15:55:34 +00:00
|
|
|
evalTest =
|
|
|
|
module:
|
|
|
|
lib.evalModules {
|
|
|
|
modules = testModules ++ [ module ];
|
2023-04-17 17:48:53 +00:00
|
|
|
class = "nixosTest";
|
2023-04-10 15:55:34 +00:00
|
|
|
};
|
2022-09-29 08:32:31 +00:00
|
|
|
runTest =
|
|
|
|
module:
|
|
|
|
(evalTest (
|
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
imports = [ module ];
|
|
|
|
result = config.test;
|
|
|
|
}
|
|
|
|
)).config.result;
|
2022-06-15 14:59:21 +00:00
|
|
|
|
|
|
|
testModules = [
|
|
|
|
./call-test.nix
|
|
|
|
./driver.nix
|
|
|
|
./interactive.nix
|
|
|
|
./legacy.nix
|
|
|
|
./meta.nix
|
|
|
|
./name.nix
|
|
|
|
./network.nix
|
|
|
|
./nodes.nix
|
|
|
|
./pkgs.nix
|
|
|
|
./run.nix
|
|
|
|
./testScript.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit evalTest runTest testModules;
|
|
|
|
}
|