diff options
Diffstat (limited to 'nixpkgs/nixos/tests/xautolock.nix')
-rw-r--r-- | nixpkgs/nixos/tests/xautolock.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/xautolock.nix b/nixpkgs/nixos/tests/xautolock.nix new file mode 100644 index 000000000000..cf81c4a1cf05 --- /dev/null +++ b/nixpkgs/nixos/tests/xautolock.nix @@ -0,0 +1,22 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: + +{ + name = "xautolock"; + meta.maintainers = [ ]; + + 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; + }; + + testScript = '' + machine.start() + machine.wait_for_x() + machine.fail("pgrep xlock") + machine.sleep(120) + machine.succeed("pgrep xlock") + ''; +}) |