about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-08-01 18:29:44 +0200
committeraszlig <aszlig@redmoonstudios.org>2014-08-01 18:29:44 +0200
commit3102b2d0382f9d681dfb450b6e574eefff6c45a7 (patch)
tree7ccd31a50740291e7f50b7b639df0432ba23e0b8 /tests
parent204f1ceaf26e3bab24054f119472dfa2f524bee0 (diff)
i3: Add preliminary VM test.
Currently just sleeps for 20 seconds and takes a screenshot. Nothing too
fancy yet.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/i3.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/i3.nix b/tests/i3.nix
new file mode 100644
index 00000000..0505b67f
--- /dev/null
+++ b/tests/i3.nix
@@ -0,0 +1,31 @@
+import <nixpkgs/nixos/tests/make-test.nix> ({ pkgs, ... }: {
+  name = "i3";
+
+  machine = { lib, ... }: {
+    imports = [
+      ../common.nix
+      <nixpkgs/nixos/tests/common/x11.nix>
+    ];
+    services.xserver.windowManager.default = lib.mkForce "i3";
+    /* XXX */
+    fonts = {
+      enableCoreFonts = true;
+      enableFontDir = true;
+      enableGhostscriptFonts = true;
+      fonts = [
+        pkgs.dosemu_fonts
+        pkgs.liberation_ttf
+      ];
+    };
+    /* !XXX */
+    vuizvui = {
+      i3.enable = true;
+    };
+  };
+
+  testScript = { nodes, ... }: ''
+    $machine->waitForX;
+    $machine->sleep(20);
+    $machine->screenshot("i3");
+  '';
+})