1 { system ? builtins.currentSystem
3 , pkgs ? import ../.. { inherit system config; }
6 with import ../lib/testing-python.nix { inherit system pkgs; };
9 meta = with pkgs.lib.maintainers; {
10 maintainers = [ lheckemann ];
14 server = { pkgs, ...}: {
15 environment.systemPackages = with pkgs; [
18 imagemagickBig # for display with working label: support
20 networking.firewall.allowedTCPPorts = [ 5901 ];
23 client = { pkgs, ... }: {
24 imports = [ ./common/x11.nix ];
26 environment.systemPackages = [ pkgs.tigervnc ];
35 for host in [server, client]:
36 host.succeed("echo foobar | vncpasswd -f > vncpasswd")
38 server.succeed("Xvnc -geometry 720x576 :1 -PasswordFile vncpasswd >&2 &")
39 server.wait_until_succeeds("nc -z localhost 5901", timeout=10)
40 server.succeed("DISPLAY=:1 xwininfo -root | grep 720x576")
41 server.execute("DISPLAY=:1 display -size 360x200 -font sans -gravity south label:'HELLO VNC WORLD' >&2 &")
44 client.execute("vncviewer server:1 -PasswordFile vncpasswd >&2 &")
45 client.wait_for_window(r"VNC")
46 client.screenshot("screenshot")
47 text = client.get_screen_text()
49 assert 'HELLO VNC WORLD' in text
51 assert 'TigerVNC' in text