Get rid of the duplication by rolling (almost) every test into a loop.
We now iterate over an array containing at least the name and list of sources.
To account for some differences between individual tests, we allow an
optional third array consisting of a dictionary for extra arguments.
In particular we ensure that the `test()` target now always depends on
the test binary, so that it will get properly rebuilt on changes to
the sources.
Note, that we're resorting in a separate commit, to ease reviewing.
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/798>
While the test was correct and checked if there is only
`record.db` in a given dir (and no other files) it wouldn't
tell us whether the file wasn't there or there were additional
files found. Hence replace the test by assertions that tell
use exactly what failed easing debugging in CI.
Fixes: e4bd4580 ("tests: Add application shutdown tests")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/795>
Rather use gapplication service. This makes the flow similar to what
Chatty does and makes us hold/release rather than having an application
window.
It also allows us to drop the --daemon.
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/760>
gtk_test_init() ends up calling gtk_init() which tries opening
the default display. CI jobs sometimes seem to trip over this
even when run through xvfb-run. Therefore we use g_test_init()
instead.
We add a small hardcoded table for now. Future versions
will improve this to parse this out of ASOPs eccdata.
If we can't determine the type of a number we add it verbatim.
It was introduced in 4b51f340c8
to prevent accessing user home during tests:
The only place where this the home is currently accessed is when loading
SIP accounts and these can already be overriden with
CALLS_SIP_ACCOUNT_FILE.
It seems that XDG_CONFIG_HOME is propagated to the flatpak runner,
even though it was only overriden for the test suite.
========================================================================
Building module calls in /builds/devrtz/calls/.flatpak-builder/build/calls-1
========================================================================
Error: module calls: Error opening directory '/builds/devrtz/calls/_build/calls': Permission denied
Reported at https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/596#note_1654082
If folks is built with the 'eds' backend it will get used by default.
During testing the system address book should not be queried.
It might even be impossible if the environment is not set up to
connect to the session bus raising the following warning:
(process:701522): folks-WARNING **: 09:13:54.291: Failed to find primary PersonaStore with type ID 'eds' and ID 'system-address-book'.
Individuals will not be linked properly and creating new links between Personas will not work.
The configured primary PersonaStore's backend may not be installed. If you are unsure, check with your distribution.
Fixes: #427
Using rescan allows use to give a priority to search paths. So this way
plugins in `CALLS_PLUGIN_DIR` take precedence over plugins we ship.
This also makes sure that the plugin test searches in the same location
as CallsManager.