summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-18 17:48:37 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-18 17:48:37 -0400
commit5ccb99e372e0b811c330788fdc863937db020079 (patch)
treec09b9db67eb14b7adb38580e6972a142c032c636 /nixos/tests
parente1a538c0da9107c67dabb5b649b21d575fa1d812 (diff)
parent974fa94fd81204645150f03543288ddb481a8b67 (diff)
downloadnixpkgs-5ccb99e372e0b811c330788fdc863937db020079.tar
nixpkgs-5ccb99e372e0b811c330788fdc863937db020079.tar.gz
nixpkgs-5ccb99e372e0b811c330788fdc863937db020079.tar.bz2
nixpkgs-5ccb99e372e0b811c330788fdc863937db020079.tar.lz
nixpkgs-5ccb99e372e0b811c330788fdc863937db020079.tar.xz
nixpkgs-5ccb99e372e0b811c330788fdc863937db020079.tar.zst
nixpkgs-5ccb99e372e0b811c330788fdc863937db020079.zip
Merge remote-tracking branch 'upstream/master' into staging
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/home-assistant.nix3
-rw-r--r--nixos/tests/xss-lock.nix25
2 files changed, 27 insertions, 1 deletions
diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix
index 3d920dccc16..797706a062c 100644
--- a/nixos/tests/home-assistant.nix
+++ b/nixos/tests/home-assistant.nix
@@ -71,6 +71,7 @@ in {
     print "$log\n";
 
     # Check that no errors were logged
-    $hass->fail("cat ${configDir}/home-assistant.log | grep -qF ERROR");
+    # The timer can get out of sync due to Hydra's load, so this error is ignored
+    $hass->fail("cat ${configDir}/home-assistant.log | grep -vF 'Timer got out of sync' | grep -qF ERROR");
   '';
 })
diff --git a/nixos/tests/xss-lock.nix b/nixos/tests/xss-lock.nix
new file mode 100644
index 00000000000..3e3864cab77
--- /dev/null
+++ b/nixos/tests/xss-lock.nix
@@ -0,0 +1,25 @@
+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->succeed("pgrep xlock");
+  '';
+})