diff --git a/nixos/release.nix b/nixos/release.nix index e7771788edc..cc451f7fe15 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -254,6 +254,7 @@ in rec { tests.fleet = scrubDrv (import tests/fleet.nix { system = "x86_64-linux"; }); #tests.gitlab = callTest tests/gitlab.nix {}; tests.gnome3 = callTest tests/gnome3.nix {}; + tests.i3wm = callTest tests/i3wm.nix {}; tests.installer.grub1 = forAllSystems (system: scrubDrv (import tests/installer.nix { inherit system; }).grub1.test); tests.installer.lvm = forAllSystems (system: scrubDrv (import tests/installer.nix { inherit system; }).lvm.test); tests.installer.rebuildCD = forAllSystems (system: scrubDrv (import tests/installer.nix { inherit system; }).rebuildCD.test); diff --git a/nixos/tests/i3wm.nix b/nixos/tests/i3wm.nix new file mode 100644 index 00000000000..0966dba8a3c --- /dev/null +++ b/nixos/tests/i3wm.nix @@ -0,0 +1,28 @@ +import ./make-test.nix { + name = "i3wm"; + + machine = { lib, pkgs, ... }: { + imports = [ ./common/x11.nix ./common/user-account.nix ]; + services.xserver.displayManager.auto.user = "alice"; + services.xserver.windowManager.default = lib.mkForce "i3"; + services.xserver.windowManager.i3.enable = true; + }; + + testScript = { nodes, ... }: '' + $machine->waitForX; + $machine->waitForWindow(qr/first configuration/); + $machine->sleep(1); + $machine->screenshot("started"); + $machine->sendKeys("ret"); + $machine->sleep(1); + $machine->sendKeys("alt"); + $machine->sleep(1); + $machine->screenshot("configured"); + $machine->sendKeys("ret"); + $machine->sleep(2); + $machine->sendKeys("alt-ret"); + $machine->waitForWindow(qr/machine.*alice/); + $machine->sleep(1); + $machine->screenshot("terminal"); + ''; +}