2020-04-24 23:36:52 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "xautolock";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ ma27 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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")
|
|
|
|
'';
|
|
|
|
})
|