1 # NixOS tests for gnome-desktop-testing-runner using software
2 # See https://github.com/NixOS/nixpkgs/issues/34987
5 system ? builtins.currentSystem,
7 pkgs ? import ../../.. { inherit system config; },
10 with import ../../lib/testing-python.nix { inherit system pkgs; };
15 callInstalledTest = pkgs.newScope { inherit makeInstalledTest; };
19 # Package to test. Needs to have an installedTests output
22 # Config to inject into machine
25 # Test script snippet to inject before gnome-desktop-testing-runner begins.
26 # This is useful for extra setup the environment may need before the runner begins.
32 # Extra flags to pass to gnome-desktop-testing-runner.
33 testRunnerFlags ? [ ],
35 # Extra attributes to pass to makeTest.
36 # They will be recursively merged into the attrset created by this function.
45 maintainers = tested.meta.maintainers or [ ];
53 ] ++ optional withX11 ../common/x11.nix;
55 environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
57 # The installed tests need to be added to the test VM’s closure.
58 # Otherwise, their dependencies might not actually be registered
59 # as valid paths in the VM’s Nix store database,
60 # and `nix-store --query` commands run as part of the tests
61 # (for example when building Flatpak runtimes) will fail.
62 environment.variables.TESTED_PACKAGE_INSTALLED_TESTS = "${tested.installedTests}/share";
66 optionalString withX11 ''
69 + optionalString (preTestScript != "") ''
74 "gnome-desktop-testing-runner ${escapeShellArgs testRunnerFlags} -d '${tested.installedTests}/share'"
93 appstream = callInstalledTest ./appstream.nix { };
94 appstream-qt = callInstalledTest ./appstream-qt.nix { };
95 colord = callInstalledTest ./colord.nix { };
96 flatpak = callInstalledTest ./flatpak.nix { };
97 flatpak-builder = callInstalledTest ./flatpak-builder.nix { };
98 fwupd = callInstalledTest ./fwupd.nix { };
99 gcab = callInstalledTest ./gcab.nix { };
100 gdk-pixbuf = callInstalledTest ./gdk-pixbuf.nix { };
101 geocode-glib = callInstalledTest ./geocode-glib.nix { };
102 gjs = callInstalledTest ./gjs.nix { };
103 glib-networking = callInstalledTest ./glib-networking.nix { };
104 gnome-photos = callInstalledTest ./gnome-photos.nix { };
105 graphene = callInstalledTest ./graphene.nix { };
106 gsconnect = callInstalledTest ./gsconnect.nix { };
107 json-glib = callInstalledTest ./json-glib.nix { };
108 ibus = callInstalledTest ./ibus.nix { };
109 libgdata = callInstalledTest ./libgdata.nix { };
110 glib-testing = callInstalledTest ./glib-testing.nix { };
111 libjcat = callInstalledTest ./libjcat.nix { };
112 libxmlb = callInstalledTest ./libxmlb.nix { };
113 malcontent = callInstalledTest ./malcontent.nix { };
114 ostree = callInstalledTest ./ostree.nix { };
115 pipewire = callInstalledTest ./pipewire.nix { };
116 upower = callInstalledTest ./upower.nix { };
117 xdg-desktop-portal = callInstalledTest ./xdg-desktop-portal.nix { };