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>
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
Copied from libfeedback as of 2e081602f627505e566cc0bdb6cd96c7642d8b65
and adjusted for our mocking needs.
The mocked library will be LD_PRELOADED for the moment,
but further changes to the build should allow us to simply link
to it in the future.
Objects of this type keep track of SDP of the local and remote peers,
allow generating offers and answers and codify default policy used for
cryptographic parameters.
When setting up a binding between GSettings and GObject properties the
CallsSetting used to set the value from the GSetting to the property and
back to the GSetting.
While the value was still the default value it was marked as non default
because it had explicitly been set without any user interaction.
Fixes the deprecation warning from meson:
DEPRECATION: target sip links against shared module sip, which is incorrect.
This will be an error in the future, so please use shared_library() for sip instead.
If shared_module() was used for sip because it has references to undefined symbols,
use shared_libary() with `override_options: ['b_lundef=false']` instead.
This gives us a better separation of concerns and it will make it a bit easier
to move the sip independent media pieces out of the plugin in the mid to long
term.
This makes sure that a NULL id will return a NULL contact and additionally
asserts that even a NULL contact will give us sensible primary/secondary display
information.
This was handled explicitly in the Call window.
By changing the logic to delay the emission of "ui-call-removed" we make sure
that the Call UI and the exported DBus object is consistent.
We also need to change the test cases to use run a GMainLoop because we now have
to wait until signal comes in.
We mock libfeedback and CallsCall to test the ringer for the following
scenarios:
- Call state changes
- User requested silencing of ringer
- Multiple calls
Shorten the needed sources from
calls_sources, calls_enum_sources, calls_resources,
wl_proto_sources, wayland_sources,
to
calls_sources
so adding new things such as generated dbus sources doesn't have to
happen in four locations but just one.