2019-11-06 11:30:29 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
2018-03-09 23:08:27 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "xautolock";
|
2021-08-27 20:09:49 +00:00
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ ];
|
2018-03-09 23:08:27 +00:00
|
|
|
|
|
|
|
nodes.machine = {
|
|
|
|
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
|
|
|
|
2020-01-26 22:41:19 +00:00
|
|
|
test-support.displayManager.auto.user = "bob";
|
2018-03-09 23:08:27 +00:00
|
|
|
services.xserver.xautolock.enable = true;
|
|
|
|
services.xserver.xautolock.time = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-11-06 11:30:29 +00:00
|
|
|
machine.start()
|
|
|
|
machine.wait_for_x()
|
|
|
|
machine.fail("pgrep xlock")
|
|
|
|
machine.sleep(120)
|
|
|
|
machine.succeed("pgrep xlock")
|
2018-03-09 23:08:27 +00:00
|
|
|
'';
|
|
|
|
})
|