summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2019-12-24 16:17:39 +0100
committerNiklas Hambüchen <mail@nh2.me>2019-12-27 01:22:35 +0100
commit12e35035f66033cee6ac37a2141f62d80cc9ef8d (patch)
treec3f463afc9961a0964a3eadf18791a57d24228d3 /nixos
parent826d61e5d9602969092fb129c7e0944a2a91249a (diff)
downloadnixpkgs-12e35035f66033cee6ac37a2141f62d80cc9ef8d.tar
nixpkgs-12e35035f66033cee6ac37a2141f62d80cc9ef8d.tar.gz
nixpkgs-12e35035f66033cee6ac37a2141f62d80cc9ef8d.tar.bz2
nixpkgs-12e35035f66033cee6ac37a2141f62d80cc9ef8d.tar.lz
nixpkgs-12e35035f66033cee6ac37a2141f62d80cc9ef8d.tar.xz
nixpkgs-12e35035f66033cee6ac37a2141f62d80cc9ef8d.tar.zst
nixpkgs-12e35035f66033cee6ac37a2141f62d80cc9ef8d.zip
nixosTests.kexec: port to python.
The test did not succeed for me before this commit
(the Perl test hung forever), and this translation exhibits
the same problem.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/kexec.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/nixos/tests/kexec.nix b/nixos/tests/kexec.nix
index b13b4131091..ec0cd9796b0 100644
--- a/nixos/tests/kexec.nix
+++ b/nixos/tests/kexec.nix
@@ -1,9 +1,15 @@
 # Test whether fast reboots via kexec work.
 
-import ./make-test.nix ({ pkgs, ...} : {
+import ./make-test-python.nix ({ pkgs, lib, ...} : {
   name = "kexec";
-  meta = with pkgs.stdenv.lib.maintainers; {
+  meta = with lib.maintainers; {
     maintainers = [ eelco ];
+    # Currently hangs forever; last output is:
+    #     machine # [   10.239914] dhcpcd[707]: eth0: adding default route via fe80::2
+    #     machine: waiting for the VM to finish booting
+    #     machine # Cannot find the ESP partition mount point.
+    #     machine # [   28.681197] nscd[692]: 692 checking for monitored file `/etc/netgroup': No such file or directory
+    broken = true;
   };
 
   machine = { ... }:
@@ -11,9 +17,9 @@ import ./make-test.nix ({ pkgs, ...} : {
 
   testScript =
     ''
-      $machine->waitForUnit("multi-user.target");
-      $machine->execute("systemctl kexec &");
-      $machine->{connected} = 0;
-      $machine->waitForUnit("multi-user.target");
+      machine.wait_for_unit("multi-user.target")
+      machine.execute("systemctl kexec &")
+      machine.connected = False
+      machine.wait_for_unit("multi-user.target")
     '';
 })