1 # NixOS tests for gnome-desktop-testing-runner using software
2 # See https://github.com/NixOS/nixpkgs/issues/34987
4 { system ? builtins.currentSystem,
6 pkgs ? import ../../.. { inherit system config; }
9 with import ../../lib/testing-python.nix { inherit system pkgs; };
14 callInstalledTest = pkgs.newScope { inherit makeInstalledTest; };
17 { # Package to test. Needs to have an installedTests output
20 # Config to inject into machine
23 # Test script snippet to inject before gnome-desktop-testing-runner begins.
24 # This is useful for extra setup the environment may need before the runner begins.
30 # Extra flags to pass to gnome-desktop-testing-runner.
31 , testRunnerFlags ? []
33 # Extra attributes to pass to makeTest.
34 # They will be recursively merged into the attrset created by this function.
43 maintainers = tested.meta.maintainers or [];
46 nodes.machine = { ... }: {
49 ] ++ optional withX11 ../common/x11.nix;
51 environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
53 # The installed tests need to be added to the test VM’s closure.
54 # Otherwise, their dependencies might not actually be registered
55 # as valid paths in the VM’s Nix store database,
56 # and `nix-store --query` commands run as part of the tests
57 # (for example when building Flatpak runtimes) will fail.
58 environment.variables.TESTED_PACKAGE_INSTALLED_TESTS = "${tested.installedTests}/share";
62 optionalString withX11 ''
65 optionalString (preTestScript != "") ''
70 "gnome-desktop-testing-runner ${escapeShellArgs testRunnerFlags} -d '${tested.installedTests}/share'"
87 appstream = callInstalledTest ./appstream.nix {};
88 appstream-qt = callInstalledTest ./appstream-qt.nix {};
89 colord = callInstalledTest ./colord.nix {};
90 flatpak = callInstalledTest ./flatpak.nix {};
91 flatpak-builder = callInstalledTest ./flatpak-builder.nix {};
92 fwupd = callInstalledTest ./fwupd.nix {};
93 gcab = callInstalledTest ./gcab.nix {};
94 gdk-pixbuf = callInstalledTest ./gdk-pixbuf.nix {};
95 geocode-glib = callInstalledTest ./geocode-glib.nix {};
96 gjs = callInstalledTest ./gjs.nix {};
97 glib-networking = callInstalledTest ./glib-networking.nix {};
98 gnome-photos = callInstalledTest ./gnome-photos.nix {};
99 graphene = callInstalledTest ./graphene.nix {};
100 gsconnect = callInstalledTest ./gsconnect.nix {};
101 json-glib = callInstalledTest ./json-glib.nix {};
102 ibus = callInstalledTest ./ibus.nix {};
103 libgdata = callInstalledTest ./libgdata.nix {};
104 glib-testing = callInstalledTest ./glib-testing.nix {};
105 libjcat = callInstalledTest ./libjcat.nix {};
106 libxmlb = callInstalledTest ./libxmlb.nix {};
107 malcontent = callInstalledTest ./malcontent.nix {};
108 ostree = callInstalledTest ./ostree.nix {};
109 pipewire = callInstalledTest ./pipewire.nix {};
110 upower = callInstalledTest ./upower.nix {};
111 xdg-desktop-portal = callInstalledTest ./xdg-desktop-portal.nix {};