diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 7b9333fdd4b3..866ed2170237 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1286,7 +1286,7 @@ in { writefreely = handleTest ./web-apps/writefreely.nix {}; wstunnel = runTest ./wstunnel.nix; xandikos = handleTest ./xandikos.nix {}; - xautolock = handleTest ./xautolock.nix {}; + xautolock = runTest ./xautolock.nix; xfce = runTest ./xfce.nix; xfce-wayland = runTest ./xfce-wayland.nix; xmonad = runTest ./xmonad.nix; diff --git a/nixos/tests/xautolock.nix b/nixos/tests/xautolock.nix index 5b35f36b7546..f19fbdf9a60e 100644 --- a/nixos/tests/xautolock.nix +++ b/nixos/tests/xautolock.nix @@ -1,27 +1,23 @@ -import ./make-test-python.nix ( - { pkgs, lib, ... }: +{ + name = "xautolock"; + meta.maintainers = [ ]; - { - name = "xautolock"; - meta.maintainers = [ ]; + nodes.machine = { + imports = [ + ./common/x11.nix + ./common/user-account.nix + ]; - nodes.machine = { - imports = [ - ./common/x11.nix - ./common/user-account.nix - ]; + test-support.displayManager.auto.user = "bob"; + services.xserver.xautolock.enable = true; + services.xserver.xautolock.time = 1; + }; - test-support.displayManager.auto.user = "bob"; - services.xserver.xautolock.enable = true; - services.xserver.xautolock.time = 1; - }; - - testScript = '' - machine.start() - machine.wait_for_x() - machine.fail("pgrep xlock") - machine.sleep(120) - machine.succeed("pgrep xlock") - ''; - } -) + testScript = '' + machine.start() + machine.wait_for_x() + machine.fail("pgrep xlock") + machine.sleep(120) + machine.succeed("pgrep xlock") + ''; +}