From ff458f3fc8a76162dbf394157a8fb507937c3f8a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 11 Mar 2011 17:00:10 +0000 Subject: [PATCH] * Add a very basic test for Xfce. svn path=/nixos/trunk/; revision=26284 --- release.nix | 1 + tests/default.nix | 1 + tests/xfce.nix | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 tests/xfce.nix diff --git a/release.nix b/release.nix index fd2f8ea6677..2a5b389c755 100644 --- a/release.nix +++ b/release.nix @@ -175,6 +175,7 @@ let remote_builds = t.remote_builds.test; subversion = t.subversion.report; trac = t.trac.test; + xfce = t.trac.xfce; }; }; diff --git a/tests/default.nix b/tests/default.nix index d156db58c5c..1e5d1a71848 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -24,4 +24,5 @@ with import ../lib/testing.nix { inherit nixpkgs services system; }; simple = makeTest (import ./simple.nix); subversion = makeTest (import ./subversion.nix); trac = makeTest (import ./trac.nix); + xfce = makeTest (import ./xfce.nix); } diff --git a/tests/xfce.nix b/tests/xfce.nix new file mode 100644 index 00000000000..2ebe7a7e5b9 --- /dev/null +++ b/tests/xfce.nix @@ -0,0 +1,35 @@ +{ pkgs, ... }: + +{ + + machine = + { config, pkgs, ... }: + + { services.xserver.enable = true; + + services.xserver.displayManager.auto.enable = true; + services.xserver.displayManager.auto.user = "alice"; + + services.xserver.desktopManager.xfce.enable = true; + + users.extraUsers = pkgs.lib.singleton + { name = "alice"; + description = "Alice Foobar"; + home = "/home/alice"; + createHome = true; + useDefaultShell = true; + password = "foobar"; + }; + }; + + testScript = + '' + $machine->waitForWindow(qr/Tips/); + $machine->sleep(10); + $machine->succeed("su - alice -c 'DISPLAY=:0.0 Terminal &'"); + $machine->waitForWindow(qr/Terminal/); + $machine->sleep(10); + $machine->screenshot("screen"); + ''; + +}