Merge pull request #211953 from bobby285271/upd/nixosTests.pantheon

nixosTests.pantheon: ensure switchboard starts + various changes
This commit is contained in:
Bobby Rong 2023-01-23 10:05:46 +08:00 committed by GitHub
commit 9d801f40e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,8 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
enableOCR = true;
testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
bob = nodes.machine.config.users.users.bob;
user = nodes.machine.users.users.alice;
bob = nodes.machine.users.users.bob;
in ''
machine.wait_for_unit("display-manager.service")
@ -40,7 +40,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
# TODO: DBus API could eliminate this? Pantheon uses Bamf.
with subtest("Check if pantheon session components actually start"):
machine.wait_until_succeeds("pgrep gala")
machine.wait_for_window("gala")
@ -49,6 +48,12 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
machine.wait_until_succeeds("pgrep plank")
machine.wait_for_window("plank")
with subtest("Open system settings"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.switchboard >&2 &'")
# Wait for all plugins to be loaded before we check if the window is still there.
machine.sleep(5)
machine.wait_for_window("io.elementary.switchboard")
with subtest("Open elementary terminal"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal >&2 &'")
machine.wait_for_window("io.elementary.terminal")