diff options
author | Domen Kožar <domen@dev.si> | 2014-02-08 21:47:28 +0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2014-02-08 21:47:39 +0100 |
commit | 028379be28695cf07ac31a73bcbc1439bfb944b9 (patch) | |
tree | 30e2ee13bf288a87c05d141122caa22909c4ad6e /nixos/tests/gnome3.nix | |
parent | 9c95b1151a27f2c70a51782918a41db7a69673c5 (diff) |
nixos: add most basic gnome3 test and take a screenshot
Diffstat (limited to 'nixos/tests/gnome3.nix')
-rw-r--r-- | nixos/tests/gnome3.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/tests/gnome3.nix b/nixos/tests/gnome3.nix new file mode 100644 index 0000000000000..98a76137842eb --- /dev/null +++ b/nixos/tests/gnome3.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: + +{ + + machine = + { config, pkgs, ... }: + + { imports = [ ./common/user-account.nix ]; + + services.xserver.enable = true; + + services.xserver.displayManager.auto.enable = true; + services.xserver.displayManager.auto.user = "alice"; + services.xserver.desktopManager.gnome3.enable = true; + }; + + testScript = + '' + $machine->waitForX; + $machine->sleep(15); + + # Check that logging in has given the user ownership of devices. + $machine->succeed("getfacl /dev/snd/timer | grep -q alice"); + + $machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'"); + $machine->waitForWindow(qr/Terminal/); + $machine->sleep(10); + $machine->screenshot("screen"); + ''; + +} |