Christian Glombek and Marge Bot
623c147542
tests/meson: Fix formatting
...
Make `check-meson` CI test happy.
Signed-off-by: Christian Glombek <c.glombek@cosa.systems >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/809 >
2025-12-17 17:52:52 +00:00
Martin Prejsa and Evangelos Ribeiro Tzaras
d7bd51828e
ui-call-data: Implement call-type property
...
Added tests for the newly added property
and tests for the newly created helper functions
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/806 >
2025-11-25 17:40:17 +01:00
Evangelos Ribeiro Tzaras and Marge Bot
7baa515707
build: Sort tests alphabetically
...
Gbp-Dch: Ignore
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/798 >
2025-10-28 13:33:28 +00:00
Evangelos Ribeiro Tzaras and Marge Bot
e4a75a0844
tests: Add dbus server binary to dependencies
...
Otherwise we `meson test` will not compile the server
required for the DBus tests.
Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/719
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/798 >
2025-10-28 13:33:28 +00:00
Evangelos Ribeiro Tzaras and Marge Bot
3184fa3af0
tests: Depend on .plugin files to exist
...
When .plugin files are missing, the plugins will not be discoverable.
These were only getting built when run with `meson compile`,
but not for `meson test`.
Helps: https://gitlab.gnome.org/GNOME/calls/-/issues/719
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/798 >
2025-10-28 13:33:28 +00:00
Evangelos Ribeiro Tzaras and Marge Bot
93a5c1911d
build: Modernize and deduplicate setting up test targets
...
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 >
2025-10-28 13:33:28 +00:00
Evangelos Ribeiro Tzaras and Marge Bot
fec9e953ae
treewide: Reformat meson files
...
Ran `meson format -e -i -r`.
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/798 >
2025-10-28 13:33:28 +00:00
Guido Günther and Marge Bot
f98f2871de
emergency-call-types: Test get_numbers_by_country_code
...
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/790 >
2025-10-16 13:45:49 +00:00
Guido Günther and Marge Bot
6f44a7c7fd
emergency-call-types: Add emergency numbers from service provider db
...
This scales better than using a built in array.
Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/714
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/790 >
2025-10-16 13:45:49 +00:00
Guido Günther and Marge Bot
07d751f958
service-providers: Add parsing for service provider info
...
We currently only need the emergency number information
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/790 >
2025-10-16 13:45:49 +00:00
Guido Günther and Marge Bot
5d751f3143
emergency-calls-manager: Init emergency type database
...
We so far did this on first access. Let's rather do it explicitly
so we notice problems early on startup.
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/790 >
2025-10-16 13:45:49 +00:00
Guido Günther and Marge Bot
3e7f5e77ab
emergency-call-types: Fix copyright year and holder
...
The files were created 2022, the header stating 2021 is a copy and paste
error. Fix a typo while at that.
Gbp-Dch: Ignore
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/790 >
2025-10-16 13:45:49 +00:00
Evangelos Ribeiro Tzaras
9fab9ec7a5
plugin-manager: Add API to unload all plugins
...
And add tests for it.
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/796 >
2025-10-14 11:11:56 +02:00
Evangelos Ribeiro Tzaras
33e5b193a0
test-application: Check for expected plugins to be loaded
...
These tests helps ensure the application will always have plugins
loaded and prevent regressions.
Helps: https://gitlab.gnome.org/GNOME/calls/-/issues/718
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/796 >
2025-10-14 11:09:24 +02:00
Guido Günther
8f6b8bc6b9
application: Actually test for write ahead log
...
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 >
2025-10-13 21:31:16 +02:00
Guido Günther
85b65d030d
tests: Make the application test depend on the binary
...
Otherwise it is not rebuilt when it changes
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/795 >
2025-10-13 21:26:23 +02:00
Guido Günther and Evangelos Ribeiro Tzaras
574e1f79a3
application: Drop ignore_activation flag
...
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 >
2025-08-30 10:52:20 +00:00
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
37b208f040
test-plugins: Switch to CallsPluginManager
2023-05-20 04:04:50 +02:00
Evangelos Ribeiro Tzaras
4598eaa020
test-manager: Codestyle
2023-05-15 09:56:28 +02:00
Evangelos Ribeiro Tzaras
e26e6640d8
test-application: Use dummy plugin
...
The test should not try communicating with any modem through ModemManager.
Fixes : #576
2023-05-12 16:46:30 +00:00
Evangelos Ribeiro Tzaras
e80abf713a
tests: Use g_test_init instead of gtk_test_init
...
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.
2023-05-09 07:44:09 +00:00
Evangelos Ribeiro Tzaras
12161080bc
test-manager: Remove unused include
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
62f6f75667
test-manager: Remove unused variable
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
cf52fbba67
test-contacts: Add more test cases
...
Testing lookup of both empty string and NULL ensures we won't regress.
2023-04-13 06:01:05 +00:00
Evangelos Ribeiro Tzaras
830906f57a
contacts-provider: Handle NULL and empty strings graceful in lookup
...
Fixes a crash where we asserted on best match when the id was NULL or
empty.
Closes : #567
2023-04-13 06:01:05 +00: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 and Evangelos Ribeiro Tzaras
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 and Evangelos Ribeiro Tzaras
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
Guido Günther and Evangelos Ribeiro Tzaras
372aa452c3
tests: Add emergency call DBus test
...
Make sure the API gets exported and we can query numbers
2023-02-12 08:00:56 +00:00
Guido Günther and Evangelos Ribeiro Tzaras
ca4e77a8b0
tests/dbus: Check for error early
...
This gives a detailed error messages whereas checking if `proxy`
is `NULL` tells us only that on error.
2023-02-12 08:00:56 +00:00
Guido Günther and Evangelos Ribeiro Tzaras
4fb2115b9b
tests/dbus: Switch to g_test_init
...
gtk_test_init() runs gtk_init() which then breaks isolation.
2023-02-12 08:00:56 +00: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
bb6b76107c
build: Rename util.{c,h} to calls-util.{c,h}
...
"util" is a very generic name. This guards against accidentally
including similarly named headers from elsewhere.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras
6137a93ce2
test-dbus: Test basic call interaction
...
Test that call gets exported on the bus and that basic interactions
such as accepting and hanging up works.
2023-01-20 17:12:02 +01: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
Evangelos Ribeiro Tzaras
35953ff4d1
tests: ui-call: Prefer type specific assertions
...
This will make it easier to see what's going wrong when an assertion fails.
2023-01-20 17:12:01 +01:00
Evangelos Ribeiro Tzaras
f997048a38
build: Rename config.h to calls-config.h
...
This guards against accidentally including configuration from elsewhere.
2022-12-22 15:08:18 +00: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
486846b069
manager: Only set search path from CALLS_PLUGIN_DIR when path exists
...
Libpeas has issues searching in a path that doesn't exsist.
2022-12-03 12:32:29 +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
d804b996f4
plugins: Rescan for plugins after adding search paths
...
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.
2022-12-03 12:32:29 +01:00