nixosTests.xmonad: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-14 23:21:51 +01:00
parent 4ada7d8158
commit ead8dabde0
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 111 additions and 113 deletions

View file

@ -1289,7 +1289,7 @@ in {
xautolock = handleTest ./xautolock.nix {}; xautolock = handleTest ./xautolock.nix {};
xfce = handleTest ./xfce.nix {}; xfce = handleTest ./xfce.nix {};
xfce-wayland = handleTest ./xfce-wayland.nix {}; xfce-wayland = handleTest ./xfce-wayland.nix {};
xmonad = handleTest ./xmonad.nix {}; xmonad = runTest ./xmonad.nix;
xmonad-xdg-autostart = runTest ./xmonad-xdg-autostart.nix; xmonad-xdg-autostart = runTest ./xmonad-xdg-autostart.nix;
xpadneo = runTest ./xpadneo.nix; xpadneo = runTest ./xpadneo.nix;
xrdp = runTest ./xrdp.nix; xrdp = runTest ./xrdp.nix;

View file

@ -1,7 +1,6 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
mkConfig = name: keys: '' mkConfig = name: keys: ''
import XMonad import XMonad
import XMonad.Operations (restart) import XMonad.Operations (restart)
@ -53,8 +52,8 @@ import ./make-test-python.nix (
]; ];
newConfig = pkgs.writeText "xmonad.hs" (mkConfig "newXMonad" newKeys); newConfig = pkgs.writeText "xmonad.hs" (mkConfig "newXMonad" newKeys);
in in
{ {
name = "xmonad"; name = "xmonad";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ maintainers = [
@ -84,7 +83,7 @@ import ./make-test-python.nix (
testScript = testScript =
{ nodes, ... }: { nodes, ... }:
let let
user = nodes.machine.config.users.users.alice; user = nodes.machine.users.users.alice;
in in
'' ''
machine.wait_for_x() machine.wait_for_x()
@ -127,5 +126,4 @@ import ./make-test-python.nix (
machine.send_key("alt-ctrl-t") machine.send_key("alt-ctrl-t")
machine.wait_for_file("/tmp/somefile") machine.wait_for_file("/tmp/somefile")
''; '';
} }
)