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