about summary refs log tree commit diff
path: root/nixos/tests/make-test-python.nix
diff options
context:
space:
mode:
authorJacek Galowicz <jacek@galowicz.de>2019-09-06 09:25:22 +0200
committerJacek Galowicz <jacek.galowicz@cyberus-technology.de>2019-11-04 23:50:27 +0100
commit3a28fefe7d4e7d842304ff4eee42c76593194b0a (patch)
treea81869665943e6d7300117c5ed61562306156515 /nixos/tests/make-test-python.nix
parentd34465eeca1762496a37074fc69990f4a664d3b1 (diff)
nixos/test: Port test driver to python
Thanks @blitz and @jtraue for help with implementing machine methods
Diffstat (limited to 'nixos/tests/make-test-python.nix')
-rw-r--r--nixos/tests/make-test-python.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/tests/make-test-python.nix b/nixos/tests/make-test-python.nix
new file mode 100644
index 0000000000000..89897fe7e61b2
--- /dev/null
+++ b/nixos/tests/make-test-python.nix
@@ -0,0 +1,9 @@
+f: {
+  system ? builtins.currentSystem,
+  pkgs ? import ../.. { inherit system; config = {}; },
+  ...
+} @ args:
+
+with import ../lib/testing-python.nix { inherit system pkgs; };
+
+makeTest (if pkgs.lib.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f)