Testing applications using Flatpak

There are many ways to test merge requests or development branches for GNOME applications. Developers usually clone the repository and build the code manually, or with the help of some tools. Newcomers are advised to use Builder, or BuildStream. However, if one doesn’t want to build the code and just test something, it might be handly to use Flatpak bundle instead. Note that this post assumes some basic Flatpak knowledge and that Flatpak is already installed on your system.

Files (Nautilus) and many other GNOME applications build Flatpak bundle as a part of their GitLab CI and CI artifacts can be used for testing. For example, to test some merge request, one has to wait until the CI is finished at first. Consequently, “View exposed artifact” needs to be expanded. Then, “Get Flatpak bundle here” can be used to download the artifact for Files (the title differs across projects).

After that the downloaded repo.tar archive needs to be extracted:

$ tar --extract --file repo.tar

Consequently the org.gnome.NautilusDevel application can be installed from the local repository (for other applications the different identifier has to be used obviously). This step also requires that the gnome-nightly remote is already added:

$ flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
$ flatpak install --reinstall --user ./repo org.gnome.NautilusDevel

Then it should be possible to start the application from applications overview, but it can be started manually as well:

$ flatpak run org.gnome.NautilusDevel

Note that sometimes it is necessary to delete application data when for example testing some changes, which are not backward compatible:

$ rm -r ~/.var/app/org.gnome.NautilusDevel

See Flatpak website to learn more about Flatpak.

Join the Conversation

1 Comment

  1. Jordan Petridis pointed me out that the nautilus-dev.flatpak bundle should be offered instead of the repository, but it is not because of https://gitlab.gnome.org/GNOME/citemplates/-/issues/7. However, the bundle can be still downloaded when you open the pipeline (e.g. clicking on the pipeline number), then open the “flatpak devel” job and click “Browse” in the sidebar. Consequently, the bundle can be installed over flatpak install --user --bundle nautilus-dev.flatpak, or it should be even possible over GNOME Software without using the command-line…

Leave a comment

Your email address will not be published. Required fields are marked *