Skip to content

Commit

Permalink
nixosTests.gnome: fix
Browse files Browse the repository at this point in the history
GNOME Shell 41 made the Eval command we use for NixOS tests internal
so in order to be still able to use it, we need to run the shell
in an unsafe mode.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1983

Hopefully, the test driver will eventually get better so that
we will not need hacks like this forever.
  • Loading branch information
jtojnar committed Oct 9, 2021
1 parent 9ec4720 commit e7f2217
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nixos/tests/gnome-xorg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
services.xserver.desktopManager.gnome.debug = true;
services.xserver.displayManager.defaultSession = "gnome-xorg";

systemd.user.services = {
"org.gnome.Shell@x11" = {
serviceConfig = {
ExecStart = [
# Clear the list before overriding it.
""
# Eval API is now internal so Shell needs to run in unsafe mode.
# TODO: improve test driver so that it supports openqa-like manipulation
# that would allow us to drop this mess.
"${pkgs.gnome.gnome-shell}/bin/gnome-shell --unsafe-mode"
];
};
};
};

virtualisation.memorySize = 1024;
};

Expand Down
15 changes: 15 additions & 0 deletions nixos/tests/gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
})
];

systemd.user.services = {
"org.gnome.Shell@wayland" = {
serviceConfig = {
ExecStart = [
# Clear the list before overriding it.
""
# Eval API is now internal so Shell needs to run in unsafe mode.
# TODO: improve test driver so that it supports openqa-like manipulation
# that would allow us to drop this mess.
"${pkgs.gnome.gnome-shell}/bin/gnome-shell --unsafe-mode"
];
};
};
};

virtualisation.memorySize = 1024;
};

Expand Down

0 comments on commit e7f2217

Please sign in to comment.