1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-18 01:25:35 +00:00
Commit graph

52 commits

Author SHA1 Message Date
Anton Lazarev
d7504da0d2 ci: replace NO_AT_BRIDGE with GTK_A11Y
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
2024-04-06 08:15:24 -07:00
Evangelos Ribeiro Tzaras
d3e42c93cd refactor: Switch to CallsPluginManager 2023-05-20 04:04:50 +02:00
Evangelos Ribeiro Tzaras
13d57f19bf tests: Add CALLS_SIP_ACCOUNT_FILE to environment
Otherwise the application test will try using the users
configured SIP accounts.
2023-04-10 08:03:21 +02:00
Guido Günther
b087bea16b Resolve emergency number types
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.
2023-04-06 16:37:59 +00:00
Guido Günther
9f68e242fd build: Run tests under C locale
This allows us to check for strings that contain translations.
We could also force a locale (see phosh's screenshot tests) at
a later point.
2023-04-06 16:37:59 +00:00
Evangelos Ribeiro Tzaras
d6619d68c9 tests: Don't override XDG_CONFIG_HOME
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
2023-02-12 10:26:48 +01:00
Evangelos Ribeiro Tzaras
e4bd4580e7 tests: Add application shutdown tests 2023-02-09 19:07:32 +00:00
Evangelos Ribeiro Tzaras
4b51f340c8 tests: Prevent tests from accessing user home
User files such as call records and VoIP account configs should be left
alone during tests.
2023-02-09 19:07:32 +00:00
Evangelos Ribeiro Tzaras
4aa6884e43 tests: Add skeleton DBus API client test suite 2023-01-20 17:12:02 +01:00
Evangelos Ribeiro Tzaras
ae6e232f98 tests: Add DBus server binary
This should facilitate DBus API testing.
2023-01-20 17:12:02 +01:00
Evangelos Ribeiro Tzaras
e5a6ace32d tests: Don't mock calls_contacts_provider_new()
Having set which folks backends to use the real function can be used
without causing any warnings leading to the build to fail.
2023-01-20 17:12:01 +01:00
Evangelos Ribeiro Tzaras
b6bdfaca99 tests: Use key-file folks backend
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
2023-01-20 17:12:01 +01:00
Evangelos Ribeiro Tzaras
82c3cea464 tests: Remove unused mock-libfeedback.h 2023-01-20 17:12:01 +01:00
Julian Sparber
b3040e38a4 tests: Ensure that plugins are build for tests that need them 2022-12-03 12:39:27 +01:00
Julian Sparber
db6d69e026 tests: Make ringer test depend on mocked libfeedback
This makes sure that the mocked libfeedback library is build before
running tests and drops the need of LD_PRELOAD.
2022-12-03 12:39:27 +01:00
Julian Sparber
270d145b65 tests: Use CALLS_PLUGIN_DIR to search for plugins in the build dir
There is no need to add a second variable to search for plugins, we can
use CALLS_PLUGIN_DIR directly.
2022-12-03 12:32:29 +01:00
Julian Sparber
baeae94c2e meson: Don't set G_TEST_*
Those env variables aren't needed.
2022-12-03 12:32:29 +01:00
Evangelos Ribeiro Tzaras
c5759df955 build: drop libmocka dependency
It is now unused
2022-10-11 07:41:07 +00:00
Evangelos Ribeiro Tzaras
280527d7a7 tests: Mock libfeedback
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.
2022-10-11 07:41:07 +00:00
Evangelos Ribeiro Tzaras
11ba83c16e Move plugin specific tests into dedicated directory
This will prove beneficial when we also add tests for the policy engine
plugins. The increased locality is also nice to have.
2022-08-19 08:43:57 +00:00
Evangelos Ribeiro Tzaras
14350a38ed sip: Add SDP crypto context class
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.
2022-05-24 22:30:03 +02:00
Evangelos Ribeiro Tzaras
4937723541 sip: Add srtp-utilities
These utilities aid in generating and parsing SDP crypto attributes to be used
during the offer/answer negotiation.
2022-05-24 22:30:03 +02:00
Evangelos Ribeiro Tzaras
e052201553 tests: Add testing for sideeffects of using CallsSettings
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.
2022-05-13 19:58:07 +02:00
Evangelos Ribeiro Tzaras
c2d2c33eae tests: build: Avoid linking against sip module
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.
2022-03-02 09:16:12 +01:00
Evangelos Ribeiro Tzaras
f017261c59 tests: Split media tests into separate file
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.
2022-03-01 18:24:04 +01:00
Evangelos Ribeiro Tzaras
f0cd344072 tests: Add primitive contact tests
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.
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras
3fe976505c manager: Delay UI Call removal and adjust to changes
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.
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
d5ccb40e68 tests: ui-call: Test property equality
And especially if properties get updated on both sides.
2022-02-02 00:09:12 +01:00
Evangelos Ribeiro Tzaras
1ca83bc2bc tests: Add ui-call tests
For now we only test the state mapping.
2022-02-02 00:09:12 +01:00
Evangelos Ribeiro Tzaras
7dadb3c50f tests: Add ringer tests
We mock libfeedback and CallsCall to test the ringer for the following
scenarios:
- Call state changes
- User requested silencing of ringer
- Multiple calls
2021-12-05 09:50:25 +01:00
Evangelos Ribeiro Tzaras
6477446a29 tests: Add gsettings schema directory to environment 2021-09-27 08:46:09 +00:00
Evangelos Ribeiro Tzaras
1a4b501653 sip: provider: Rename test environment variable 2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
babd013bd7 Remove CallsCredentials and adapt to changes
The provider knows best which credentials it needs and CallsCredentials
was not generic to begin with, so get rid of it.
2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
de6293c05e meson: Passing -fPIE explicitly is discouraged
as indicated by the logs during configuration:

`WARNING: Use the 'pie' kwarg instead of passing '-fpie' manually to 'provider'`
2021-06-22 04:37:11 +02:00
Evangelos Ribeiro Tzaras
503e5c2154 test: Add util tests
Unit test the `get_protocol_from_address()` function family.
2021-05-28 13:18:24 +02:00
Mohammed Sadiq
b1278f6140 build: Avoid building files multiple times
We don't have to build each source for every test, instead we could
create a static library link it with every test, which will be a lot
faster.
2021-05-17 20:00:04 +05:30
Evangelos Ribeiro Tzaras
1db1ba6ca9 test: Add account tests 2021-05-04 06:48:36 +02:00
Evangelos Ribeiro Tzaras
cbe1280fb2 test: Use dummy audio elements for Gstreamer pipelines 2021-04-20 09:47:19 +02:00
Evangelos Ribeiro Tzaras
3fd07c4dee tests: don't special case tests needing FOR_TESTING define
This was introduced in 649da75 and was in preparation for the
sip testing code from 030313d and 21abfb4.
2021-04-06 16:55:33 +00:00
Evangelos Ribeiro Tzaras
a44c265903 sip: remove FOR_TESTING ifdef 2021-04-06 16:55:33 +00:00
Guido Günther
443d23dd56 build: deduplicate sources
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.
2021-04-06 14:18:06 +02:00
Evangelos Ribeiro Tzaras
75d32d0924 sip: Allow controlling automatic account loading via environment 2021-04-05 06:13:44 +00:00
Evangelos Ribeiro Tzaras
030313d42e test: Add basic SIP provider tests 2021-04-03 00:46:27 +02:00
Evangelos Ribeiro Tzaras
649da75a2f test: Test loading provider plugins 2021-04-02 07:24:51 +00:00
Guido Günther
c3e6a444db tests: Disable atk bridge
Otherwise this can trigger test failures. Similar to what we
did in libhandy.

Fixes errors like:
---
G_DEBUG='gc-friendly,fatal-warnings' G_TEST_BUILDDIR='/home/purism/builds/calls/_build/tests' PYTHONDONTWRITEBYTECODE='yes' MALLOC_CHECK_='2' GSETTINGS_BACKEND='memory' G_TEST_SRCDIR='/home/purism/builds/calls/tests' /home/purism/builds/calls/_build/tests/manager
--- stderr ---

(/home/purism/builds/calls/_build/tests/manager:10212): dbind-WARNING **: 12:01:50.237: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
-------
2020-06-08 09:46:58 +00:00
Julian Sparber
3e138eeccd
Manager: add test 2020-03-27 12:05:33 +01:00
Bob Ham
8f2cddddcf Add -Wno-error=deprecated-declarations to build arguments
This works around the deprecation warning for HdyDialer.
2019-12-10 10:03:40 +00:00
Bob Ham
6a7fbf0b59 Add phone number lookup using libfolks
The CallsBestMatchView and CallsPhoneNumberQuery classes are written
in Vala because they may be generally useful and to leave open the
possibility of adding them to libfolks itself, which is written in
Vala.
2019-10-29 13:21:45 +00:00
Bob Ham
3201c8e69b Display call window over the phosh lockscreen
Closes #41
2019-09-06 14:58:08 +01:00
Bob Ham
460c0c6c3d Turn providers into plugins courtesy of libpeas
This is an initial, static implementation of plugins.  The
CallsApplication has a plugin name which can be changed with a new
--provider command line option.  This plugin name is used to
instantiate the appropriate plugin when the application is activated.
From then on, the plugin cannot change.

In future, we can expand this support to include loading multiple
plugins at once, configurable through some UI.  This will have
far-reaching implications though, and complicate things like
enumerating the provider hierarchy.  There is also no practical
benefit right now; the mm and ofono plugins can't be used at the same
time because ModemManager and oFono don't play nice together, and the
whole raison d'être of the dummy plugin is undermined if you can make
use of one of the others.  So for now, we just implement one static
plugin.
2018-11-23 15:51:46 +00:00