diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-02-24 01:09:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-02-24 01:09:00 +0000 |
commit | 072c01a28f865e9487df09aed7ddff328252fb36 (patch) | |
tree | 6df6e652915940255f294ed8998cce1c4c7c2d40 /nixpkgs/nixos/tests/pantheon.nix | |
parent | 024b46ff20027c15322e5d868ecec42632556d4b (diff) | |
parent | 969cff2691a02b3d7e5468beda26c482d8986644 (diff) | |
download | nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.gz nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.bz2 nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.lz nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.xz nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.zst nixlib-072c01a28f865e9487df09aed7ddff328252fb36.zip |
Merge commit '969cff2691a02b3d7e5468beda26c482d8986644'
Diffstat (limited to 'nixpkgs/nixos/tests/pantheon.nix')
-rw-r--r-- | nixpkgs/nixos/tests/pantheon.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/pantheon.nix b/nixpkgs/nixos/tests/pantheon.nix new file mode 100644 index 000000000000..c50f77f86173 --- /dev/null +++ b/nixpkgs/nixos/tests/pantheon.nix @@ -0,0 +1,55 @@ +import ./make-test.nix ({ pkgs, ...} : + +{ + name = "pantheon"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ worldofpeace ]; + }; + + machine = { ... }: + + { + imports = [ ./common/user-account.nix ]; + + services.xserver.enable = true; + services.xserver.desktopManager.pantheon.enable = true; + + virtualisation.memorySize = 1024; + }; + + enableOCR = true; + + testScript = { nodes, ... }: let + user = nodes.machine.config.users.users.alice; + in '' + startAll; + + # Wait for display manager to start + $machine->waitForText(qr/${user.description}/); + $machine->screenshot("lightdm"); + + # Log in + $machine->sendChars("${user.password}\n"); + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); + + # Check if "pantheon-shell" components actually start + $machine->waitUntilSucceeds("pgrep gala"); + $machine->waitForWindow(qr/gala/); + $machine->waitUntilSucceeds("pgrep wingpanel"); + $machine->waitForWindow("wingpanel"); + $machine->waitUntilSucceeds("pgrep plank"); + $machine->waitForWindow(qr/plank/); + + # Check that logging in has given the user ownership of devices. + $machine->succeed("getfacl /dev/snd/timer | grep -q alice"); + + # Open elementary terminal + $machine->execute("su - alice -c 'DISPLAY=:0.0 io.elementary.terminal &'"); + $machine->waitForWindow(qr/io.elementary.terminal/); + + # Take a screenshot of the desktop + $machine->sleep(20); + $machine->screenshot("screen"); + ''; +}) |