nixpkgs-suyu/tests/firefox.nix
Eelco Dolstra 73668f41da * Added an "auto" pseudo display manager that logs in a user
automatically.  This is mostly useful for testing.  (KDM also has
  this feature, but it's nice not to depend on KDE for non-KDE tests.)

svn path=/nixos/trunk/; revision=19239
2010-01-05 15:32:14 +00:00

33 lines
741 B
Nix

{ pkgs, ... }:
{
machine =
{ config, pkgs, ... }:
{ services.xserver.enable = true;
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.auto.enable = true;
services.xserver.windowManager.default = "icewm";
services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
environment.systemPackages = [ pkgs.firefox ];
};
testScript =
''
$machine->waitForFile("/tmp/.X11-unix/X0");
sleep 10;
$machine->execute("DISPLAY=:0.0 HOME=/root firefox file://${pkgs.valgrind}/share/doc/valgrind/html/index.html &");
sleep 30;
$machine->screenshot("screen");
'';
}