about summary refs log tree commit diff
path: root/nixos/tests/run-in-machine.nix
diff options
context:
space:
mode:
authorLéo Gaspard <leo@gaspard.io>2018-11-11 17:41:11 +0900
committerLéo Gaspard <leo@gaspard.io>2018-11-11 23:11:45 +0900
commit6c68fbd4e1f8beac39cb1f499ff90c78256262d6 (patch)
treeaac6a33afe1ed7f4ebf408cc83903ea8a66531da /nixos/tests/run-in-machine.nix
parent921b63134a0181533b3673a48f96bb3b75ac3a9f (diff)
downloadnixlib-6c68fbd4e1f8beac39cb1f499ff90c78256262d6.tar
nixlib-6c68fbd4e1f8beac39cb1f499ff90c78256262d6.tar.gz
nixlib-6c68fbd4e1f8beac39cb1f499ff90c78256262d6.tar.bz2
nixlib-6c68fbd4e1f8beac39cb1f499ff90c78256262d6.tar.lz
nixlib-6c68fbd4e1f8beac39cb1f499ff90c78256262d6.tar.xz
nixlib-6c68fbd4e1f8beac39cb1f499ff90c78256262d6.tar.zst
nixlib-6c68fbd4e1f8beac39cb1f499ff90c78256262d6.zip
tests: refactor to carry the package set as an argument
This way, the package set will be possible to pass without re-importing
all the time
Diffstat (limited to 'nixos/tests/run-in-machine.nix')
-rw-r--r--nixos/tests/run-in-machine.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/tests/run-in-machine.nix b/nixos/tests/run-in-machine.nix
index bd90dc3080bd..116f5dc28a62 100644
--- a/nixos/tests/run-in-machine.nix
+++ b/nixos/tests/run-in-machine.nix
@@ -1,6 +1,9 @@
-{ system ? builtins.currentSystem }:
+{ system ? builtins.currentSystem,
+  config ? {},
+  pkgs ? import ../.. { inherit system config; }
+}:
 
-with import ../lib/testing.nix { inherit system; };
+with import ../lib/testing.nix { inherit system pkgs; };
 
 let
   output = runInMachine {