nixpkgs/nixos/tests/xterm.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
704 B
Nix
Raw Normal View History

2020-11-17 03:13:13 +00:00
import ./make-test-python.nix ({ pkgs, ...} : {
name = "xterm";
meta = with pkgs.lib.maintainers; {
2020-11-17 03:13:13 +00:00
maintainers = [ nequissimus ];
};
2022-03-20 23:15:30 +00:00
nodes.machine = { pkgs, ... }:
2020-11-17 03:13:13 +00:00
{
imports = [ ./common/x11.nix ];
services.xserver.desktopManager.xterm.enable = false;
};
testScript =
''
machine.wait_for_x()
machine.succeed("DISPLAY=:0 xterm -title testterm -class testterm -fullscreen >&2 &")
2020-11-17 03:13:13 +00:00
machine.sleep(2)
machine.send_chars("echo $XTERM_VERSION >> /tmp/xterm_version\n")
machine.wait_for_file("/tmp/xterm_version")
assert "${pkgs.xterm.version}" in machine.succeed("cat /tmp/xterm_version")
machine.screenshot("window")
'';
})