From c6eb691fb8cd0616b85d1e6d91c650030f3250ac Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 23 Aug 2019 03:16:28 +0200 Subject: gnome-photos: add installed tests --- nixos/tests/gnome-photos.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 nixos/tests/gnome-photos.nix (limited to 'nixos/tests/gnome-photos.nix') diff --git a/nixos/tests/gnome-photos.nix b/nixos/tests/gnome-photos.nix new file mode 100644 index 0000000000000..2ecda1d68ce34 --- /dev/null +++ b/nixos/tests/gnome-photos.nix @@ -0,0 +1,42 @@ +# run installed tests +import ./make-test.nix ({ pkgs, lib, ... }: + +let + + # gsettings tool with access to gsettings-desktop-schemas + desktop-gsettings = with pkgs; stdenv.mkDerivation { + name = "desktop-gsettings"; + dontUnpack = true; + nativeBuildInputs = [ glib wrapGAppsHook ]; + buildInputs = [ gsettings-desktop-schemas ]; + installPhase = '' + runHook preInstall + mkdir -p $out/bin + ln -s ${glib.bin}/bin/gsettings $out/bin/desktop-gsettings + runHook postInstall + ''; + }; + +in + +{ + name = "gnome-photos"; + meta = { + maintainers = pkgs.gnome-photos.meta.maintainers; + }; + + machine = { pkgs, ... }: { + imports = [ ./common/x11.nix ]; + programs.dconf.enable = true; + services.gnome3.at-spi2-core.enable = true; # needed for dogtail + environment.systemPackages = with pkgs; [ gnome-desktop-testing desktop-gsettings ]; + services.dbus.packages = with pkgs; [ gnome-photos ]; + }; + + testScript = '' + $machine->waitForX; + # dogtail needs accessibility enabled + $machine->succeed("desktop-gsettings set org.gnome.desktop.interface toolkit-accessibility true 2>&1"); + $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.gnome-photos.installedTests}/share' 2>&1"); + ''; +}) -- cgit 1.4.1