git.iko.soy/typeable/nixpkgs
on master help sign in
xterm: Add test
commit61e56265c24ed24527962f2b3d5d049983749c8c authorTim Steinbach <tim@nequissimus.com> dateMon 16 Nov 2020, 22:13 (6 years ago) parentd2d6b50
2 files changed+24
nixos/tests/all-tests.nix+1 nixos/tests/xterm.nix+23
nixos/tests/all-tests.nix+1
@@ -388,6 +388,7 @@ in
388388 xmonad = handleTest ./xmonad.nix {};
389389 xrdp = handleTest ./xrdp.nix {};
390390 xss-lock = handleTest ./xss-lock.nix {};
391+ xterm = handleTest ./xterm.nix {};
391392 yabar = handleTest ./yabar.nix {};
392393 yggdrasil = handleTest ./yggdrasil.nix {};
393394 zfs = handleTest ./zfs.nix {};
nixos/tests/xterm.nixnew file+23
@@ -0,0 +1,23 @@
1+import ./make-test-python.nix ({ pkgs, ...} : {
2+ name = "xterm";
3+ meta = with pkgs.stdenv.lib.maintainers; {
4+ maintainers = [ nequissimus ];
5+ };
6+
7+ machine = { pkgs, ... }:
8+ {
9+ imports = [ ./common/x11.nix ];
10+ services.xserver.desktopManager.xterm.enable = false;
11+ };
12+
13+ testScript =
14+ ''
15+ machine.wait_for_x()
16+ machine.succeed("DISPLAY=:0 xterm -title testterm -class testterm -fullscreen &")
17+ machine.sleep(2)
18+ machine.send_chars("echo $XTERM_VERSION >> /tmp/xterm_version\n")
19+ machine.wait_for_file("/tmp/xterm_version")
20+ assert "${pkgs.xterm.version}" in machine.succeed("cat /tmp/xterm_version")
21+ machine.screenshot("window")
22+ '';
23+})