diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-08-23 03:16:28 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-08-23 19:31:14 +0200 |
commit | c6eb691fb8cd0616b85d1e6d91c650030f3250ac (patch) | |
tree | 14beaa589c0a52c0e4e423c4e170ea6eb736bc5b /nixos/tests | |
parent | c241e9756bf80ca7f672925e2d83ec7746ee80af (diff) | |
download | nixlib-c6eb691fb8cd0616b85d1e6d91c650030f3250ac.tar nixlib-c6eb691fb8cd0616b85d1e6d91c650030f3250ac.tar.gz nixlib-c6eb691fb8cd0616b85d1e6d91c650030f3250ac.tar.bz2 nixlib-c6eb691fb8cd0616b85d1e6d91c650030f3250ac.tar.lz nixlib-c6eb691fb8cd0616b85d1e6d91c650030f3250ac.tar.xz nixlib-c6eb691fb8cd0616b85d1e6d91c650030f3250ac.tar.zst nixlib-c6eb691fb8cd0616b85d1e6d91c650030f3250ac.zip |
gnome-photos: add installed tests
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/gnome-photos.nix | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 4eeee9c35c07..6e3e06889200 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -97,6 +97,7 @@ in glusterfs = handleTest ./glusterfs.nix {}; gnome3-xorg = handleTest ./gnome3-xorg.nix {}; gnome3 = handleTest ./gnome3.nix {}; + gnome-photos = handleTest ./gnome-photos.nix {}; gocd-agent = handleTest ./gocd-agent.nix {}; gocd-server = handleTest ./gocd-server.nix {}; google-oslogin = handleTest ./google-oslogin {}; diff --git a/nixos/tests/gnome-photos.nix b/nixos/tests/gnome-photos.nix new file mode 100644 index 000000000000..2ecda1d68ce3 --- /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"); + ''; +}) |