* Use scrot to make screenshots.
* Another X11 test (running Quake 3). svn path=/nixos/trunk/; revision=16949
This commit is contained in:
parent
05cb34c6d0
commit
497760b444
|
@ -138,11 +138,9 @@ rec {
|
||||||
mv $i $out/coverage-data/$(dirname $i)
|
mv $i $out/coverage-data/$(dirname $i)
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in $out/*.xwd; do
|
for i in $out/*.png; do
|
||||||
j=$out/$(basename $i .xwd).png
|
|
||||||
${pkgs.imagemagick}/bin/convert $i $j
|
|
||||||
ensureDir $out/nix-support
|
ensureDir $out/nix-support
|
||||||
echo "report screenshot $j" >> $out/nix-support/hydra-build-products
|
echo "report screenshot $i" >> $out/nix-support/hydra-build-products
|
||||||
done
|
done
|
||||||
''; # */
|
''; # */
|
||||||
};
|
};
|
||||||
|
|
|
@ -114,6 +114,14 @@ let
|
||||||
system = "i686-linux";
|
system = "i686-linux";
|
||||||
}).test;
|
}).test;
|
||||||
|
|
||||||
|
tests.quake3 =
|
||||||
|
{ services ? ../services }:
|
||||||
|
|
||||||
|
(import ./tests/quake3.nix {
|
||||||
|
inherit nixpkgs services;
|
||||||
|
system = "i686-linux";
|
||||||
|
}).test;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ rec {
|
||||||
services.xserver.desktopManager.default = "kde4";
|
services.xserver.desktopManager.default = "kde4";
|
||||||
services.xserver.desktopManager.kde4.enable = true;
|
services.xserver.desktopManager.kde4.enable = true;
|
||||||
|
|
||||||
services.sshd.enable = true;
|
|
||||||
|
|
||||||
users.extraUsers = pkgs.lib.singleton
|
users.extraUsers = pkgs.lib.singleton
|
||||||
{ name = "alice";
|
{ name = "alice";
|
||||||
description = "Alice Foobar";
|
description = "Alice Foobar";
|
||||||
|
@ -38,7 +36,7 @@ rec {
|
||||||
password = "foobar";
|
password = "foobar";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.xorg.xclock pkgs.xorg.xwd ];
|
environment.systemPackages = [ pkgs.scrot ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,7 +50,7 @@ rec {
|
||||||
|
|
||||||
sleep 60;
|
sleep 60;
|
||||||
|
|
||||||
print STDERR $client->execute("DISPLAY=:0.0 xwd -root > /hostfs/$ENV{out}/screen.xwd");
|
print STDERR $client->execute("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen.png");
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
39
tests/quake3.nix
Normal file
39
tests/quake3.nix
Normal file
|
@ -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");
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue