summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorTim Steinbach <NeQuissimus@users.noreply.github.com>2017-09-06 15:03:41 -0400
committerGitHub <noreply@github.com>2017-09-06 15:03:41 -0400
commit0857e4c84d3ba9e4faa52aa033bbde3607652e86 (patch)
tree08a96602cf6650180df75ba1caade5ac613dab2e /nixos
parent37392454f33d5472d1877fe41c017057618169cc (diff)
parente153fa84a5ff88ee9f4b23e7b0d9685b5efde58c (diff)
downloadnixpkgs-0857e4c84d3ba9e4faa52aa033bbde3607652e86.tar
nixpkgs-0857e4c84d3ba9e4faa52aa033bbde3607652e86.tar.gz
nixpkgs-0857e4c84d3ba9e4faa52aa033bbde3607652e86.tar.bz2
nixpkgs-0857e4c84d3ba9e4faa52aa033bbde3607652e86.tar.lz
nixpkgs-0857e4c84d3ba9e4faa52aa033bbde3607652e86.tar.xz
nixpkgs-0857e4c84d3ba9e4faa52aa033bbde3607652e86.tar.zst
nixpkgs-0857e4c84d3ba9e4faa52aa033bbde3607652e86.zip
Merge pull request #28989 from NeQuissimus/tests_xmonad
Add XMonad test
Diffstat (limited to 'nixos')
-rw-r--r--nixos/release-combined.nix1
-rw-r--r--nixos/release.nix1
-rw-r--r--nixos/tests/xmonad.nix28
3 files changed, 30 insertions, 0 deletions
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
index 84dda8cc64c..78874641bd2 100644
--- a/nixos/release-combined.nix
+++ b/nixos/release-combined.nix
@@ -117,6 +117,7 @@ in rec {
         (all nixos.tests.slim)
         (all nixos.tests.udisks2)
         (all nixos.tests.xfce)
+        (all nixos.tests.xmonad)
 
         nixpkgs.tarball
         (all allSupportedNixpkgs.emacs)
diff --git a/nixos/release.nix b/nixos/release.nix
index 59c269627f1..ad062e82557 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -315,6 +315,7 @@ in rec {
   tests.virtualbox = callSubTests tests/virtualbox.nix { system = "x86_64-linux"; };
   tests.wordpress = callTest tests/wordpress.nix {};
   tests.xfce = callTest tests/xfce.nix {};
+  tests.xmonad = callTest tests/xmonad.nix {};
 
 
   /* Build a bunch of typical closures so that Hydra can keep track of
diff --git a/nixos/tests/xmonad.nix b/nixos/tests/xmonad.nix
new file mode 100644
index 00000000000..2e86f942a66
--- /dev/null
+++ b/nixos/tests/xmonad.nix
@@ -0,0 +1,28 @@
+import ./make-test.nix ({ pkgs, ...} : {
+  name = "xmonad";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ nequissimus ];
+  };
+
+  machine = { lib, pkgs, ... }: {
+    imports = [ ./common/x11.nix ./common/user-account.nix ];
+    services.xserver.displayManager.auto.user = "alice";
+    services.xserver.windowManager.default = lib.mkForce "xmonad";
+    services.xserver.windowManager.xmonad = {
+      enable = true;
+      enableContribAndExtras = true;
+      extraPackages = with pkgs.haskellPackages; haskellPackages: [ xmobar ];
+    };
+  };
+
+  testScript = { nodes, ... }: ''
+    $machine->waitForX;
+    $machine->waitForFile("/home/alice/.Xauthority");
+    $machine->succeed("xauth merge ~alice/.Xauthority");
+    $machine->sleep(3);
+    $machine->sendKeys("alt-shift-ret");
+    $machine->waitForWindow(qr/machine.*alice/);
+    $machine->sleep(1);
+    $machine->screenshot("terminal");
+  '';
+})