4db2d4d1fd
Please refer to the conversation in the original PR (#40619) for further reference: https://github.com/NixOS/nixpkgs/pull/40619#issuecomment-390437845 It takes some time after the standby to trigger the locker which might break the test on Hydra.
26 lines
669 B
Nix
26 lines
669 B
Nix
import ./make-test.nix ({ pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
name = "xss-lock";
|
|
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
|
|
|
|
machine = {
|
|
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
|
programs.xss-lock.enable = true;
|
|
programs.xss-lock.lockerCommand = "${pkgs.xlockmore}/bin/xlock";
|
|
services.xserver.displayManager.auto.user = "alice";
|
|
};
|
|
|
|
testScript = ''
|
|
$machine->start;
|
|
$machine->waitForX;
|
|
$machine->waitForUnit("xss-lock.service", "alice");
|
|
|
|
$machine->fail("pgrep xlock");
|
|
$machine->succeed("su -l alice -c 'xset dpms force standby'");
|
|
$machine->waitUntilSucceeds("pgrep xlock");
|
|
'';
|
|
})
|