diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-09-02 23:16:33 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-09-02 23:16:33 +0000 |
commit | 497760b44479429d04ecccc3bc8ffaa8a7103f58 (patch) | |
tree | 3073c7fddae46f5cc87961a83dbb21b2b9a412b9 /tests/quake3.nix | |
parent | 05cb34c6d0fde621f5d55be5ef6fe67bbd860ca4 (diff) | |
download | nixpkgs-497760b44479429d04ecccc3bc8ffaa8a7103f58.tar nixpkgs-497760b44479429d04ecccc3bc8ffaa8a7103f58.tar.gz nixpkgs-497760b44479429d04ecccc3bc8ffaa8a7103f58.tar.bz2 nixpkgs-497760b44479429d04ecccc3bc8ffaa8a7103f58.tar.lz nixpkgs-497760b44479429d04ecccc3bc8ffaa8a7103f58.tar.xz nixpkgs-497760b44479429d04ecccc3bc8ffaa8a7103f58.tar.zst nixpkgs-497760b44479429d04ecccc3bc8ffaa8a7103f58.zip |
* Use scrot to make screenshots.
* Another X11 test (running Quake 3). svn path=/nixos/trunk/; revision=16949
Diffstat (limited to 'tests/quake3.nix')
-rw-r--r-- | tests/quake3.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/quake3.nix b/tests/quake3.nix new file mode 100644 index 00000000000..4521d157b4e --- /dev/null +++ b/tests/quake3.nix @@ -0,0 +1,39 @@ +{ 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"); + ''; + +} |