1 import ./make-test-python.nix ({ pkgs, ... }:
7 { imports = [ ./common/x11.nix ];
8 environment.systemPackages = [ pkgs.teeworlds ];
13 meta = with pkgs.lib.maintainers; {
14 maintainers = [ hax404 ];
19 { services.teeworlds = {
33 server.wait_for_unit("teeworlds.service")
34 server.wait_until_succeeds("ss --numeric --udp --listening | grep -q 8303")
39 client1.execute("teeworlds 'player_name Alice;connect server' >&2 &")
40 server.wait_until_succeeds(
41 'journalctl -u teeworlds -e | grep --extended-regexp -q "team_join player=\'[0-9]:Alice"'
44 client2.execute("teeworlds 'player_name Bob;connect server' >&2 &")
45 server.wait_until_succeeds(
46 'journalctl -u teeworlds -e | grep --extended-regexp -q "team_join player=\'[0-9]:Bob"'
49 server.sleep(10) # wait for a while to get a nice screenshot
51 client1.screenshot("screen_client1")
52 client2.screenshot("screen_client2")