1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/tests/quake3.nix
Eelco Dolstra 497760b444 * Use scrot to make screenshots.
* Another X11 test (running Quake 3).

svn path=/nixos/trunk/; revision=16949
2009-09-02 23:16:33 +00:00

40 lines
803 B
Nix

{ nixos ? ./..
, nixpkgs ? /etc/nixos/nixpkgs
, services ? /etc/nixos/services
, system ? builtins.currentSystem
}:
with import ../lib/build-vms.nix { inherit nixos nixpkgs services system; };
rec {
nodes =
{ client =
{ config, pkgs, ... }:
{ services.xserver.enable = true;
services.xserver.driSupport = true;
environment.systemPackages = [ pkgs.scrot pkgs.xorg.twm pkgs.quake3demo ];
};
};
vms = buildVirtualNetwork { inherit nodes; };
test = runTests vms
''
startAll;
$client->waitForFile("/tmp/.X11-unix/X0");
sleep 20;
print STDERR $client->execute("DISPLAY=:0.0 quake3 &");
sleep 20;
print STDERR $client->execute("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen.png");
'';
}