blob: 9276dae3737f3f199cf5990362163cccb3e9a7be (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
f: { system ? builtins.currentSystem, ... } @ args: let
lib = import <nixpkgs/lib>;
testLib = import <nixpkgs/nixos/lib/testing.nix> {
inherit system;
};
pkgs = import <nixpkgs> { inherit system; };
testArgs = if builtins.isFunction f then f (args // {
pkgs = pkgs // {
vuizvui = import ../pkgs { inherit pkgs; };
};
}) else f;
nodes = testArgs.nodes or (if testArgs ? machine then {
inherit (testArgs) machine;
} else {});
injectCommon = name: conf: {
imports = [ conf ] ++ import ../modules/module-list.nix;
};
testArgsWithCommon = removeAttrs testArgs [ "machine" ] // {
nodes = lib.mapAttrs injectCommon nodes;
};
in testLib.makeTest testArgsWithCommon
|