diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-08-06 18:20:26 -0400 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2019-08-06 19:13:35 -0400 |
commit | 087c640e1aa8ae9bf06931ebbf31ad4a91ce7293 (patch) | |
tree | 5257407b0746b95e0d733a4250d9fc510bc8b51c /nixos/tests/gnome3-xorg.nix | |
parent | f3ea1c8238bea544eac14607ac3bdee386718bce (diff) | |
download | nixpkgs-087c640e1aa8ae9bf06931ebbf31ad4a91ce7293.tar nixpkgs-087c640e1aa8ae9bf06931ebbf31ad4a91ce7293.tar.gz nixpkgs-087c640e1aa8ae9bf06931ebbf31ad4a91ce7293.tar.bz2 nixpkgs-087c640e1aa8ae9bf06931ebbf31ad4a91ce7293.tar.lz nixpkgs-087c640e1aa8ae9bf06931ebbf31ad4a91ce7293.tar.xz nixpkgs-087c640e1aa8ae9bf06931ebbf31ad4a91ce7293.tar.zst nixpkgs-087c640e1aa8ae9bf06931ebbf31ad4a91ce7293.zip |
nixosTests.gnome3-xorg: rename from gnome3
Diffstat (limited to 'nixos/tests/gnome3-xorg.nix')
-rw-r--r-- | nixos/tests/gnome3-xorg.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/nixos/tests/gnome3-xorg.nix b/nixos/tests/gnome3-xorg.nix new file mode 100644 index 00000000000..ae34b6d22b0 --- /dev/null +++ b/nixos/tests/gnome3-xorg.nix @@ -0,0 +1,41 @@ +import ./make-test.nix ({ pkgs, ...} : { + name = "gnome3-xorg"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ domenkozar eelco lethalman ]; + }; + + machine = + { ... }: + + { imports = [ ./common/user-account.nix ]; + + services.xserver.enable = true; + + services.xserver.displayManager.gdm.enable = false; + services.xserver.displayManager.lightdm.enable = true; + services.xserver.displayManager.lightdm.autoLogin.enable = true; + services.xserver.displayManager.lightdm.autoLogin.user = "alice"; + services.xserver.desktopManager.gnome3.enable = true; + services.xserver.desktopManager.default = "gnome-xorg"; + + virtualisation.memorySize = 1024; + }; + + testScript = + '' + $machine->waitForX; + + # wait for alice to be logged in + $machine->waitForUnit("default.target","alice"); + + # 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->succeed("xauth merge ~alice/.Xauthority"); + $machine->waitForWindow(qr/alice.*machine/); + $machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'"); + $machine->sleep(10); + $machine->screenshot("screen"); + ''; +}) |