diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-03-18 11:48:05 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-03-18 11:48:05 +0100 |
commit | a41fd5b7223fc83d43ede24477294685ddaf67a7 (patch) | |
tree | 47a88b2ca08b52fddbd88a85ef4b96936c873dbe /labernix/tests/make-test.nix | |
parent | 9b00ef30a0543ce74aef290a27b5831edf26d567 (diff) |
tests: Integrate make-test.nix from labernix.
We already have abstracted the injection of the module list in labernix, so we can reuse this with only minor changes. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'labernix/tests/make-test.nix')
-rw-r--r-- | labernix/tests/make-test.nix | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/labernix/tests/make-test.nix b/labernix/tests/make-test.nix deleted file mode 100644 index 10381afd..00000000 --- a/labernix/tests/make-test.nix +++ /dev/null @@ -1,28 +0,0 @@ -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 // { - labernix = import ../pkgs { inherit pkgs; }; - }; - }) else f; - - nodes = testArgs.nodes or (if testArgs ? machine then { - inherit (testArgs) machine; - } else {}); - - injectCommon = name: conf: { - imports = [ ../common.nix conf ]; - }; - - testArgsWithCommon = removeAttrs testArgs [ "machine" ] // { - nodes = lib.mapAttrs injectCommon nodes; - }; - -in testLib.makeTest testArgsWithCommon |