Commit Graph

21176 Commits

Author SHA1 Message Date
Philip Withnall
2efa399abd Merge branch 'wip/hadess/update-installed-tests-ci' into 'master'
Update installed tests CI

See merge request GNOME/glib!1278
2019-12-12 10:34:37 +00:00
Bastien Nocera
5a174d105d ci: Fix permission error in valgrind analysis stage
The valgrind analysis stage inherits from existing artefacts, so make
sure to reset the permissions on the glib build directory to avoid a new
build failing.

$ meson ${MESON_COMMON_OPTIONS} --werror -Dsystemtap=true -Ddtrace=true -Dfam=true -Dinstalled_tests=true _build
<snip>
PermissionError: [Errno 13] Permission denied: '/builds/GNOME/glib/_build/meson-logs/meson-log.txt'
2019-12-12 10:59:47 +01:00
Bastien Nocera
c782042087 ci: Disable xdg-desktop-portal tests
They're not needed to actually run xdg-desktop-portal itself, and
we won't need libportal then.
2019-12-11 15:23:31 +01:00
Bastien Nocera
4b6ad93c86 ci: GMemoryMonitor support is now merged in gobject-introspection 2019-12-11 15:12:01 +01:00
Bastien Nocera
5a58da36d2 ci: Fix installed-tests until a newer GLib is released
Force-enable portal memory monitor until 2.63.3 is released
2019-12-11 14:15:54 +01:00
Bastien Nocera
bf91e3adf7 ci: GMemoryMonitor support is now merged in xdg-desktop-portal 2019-12-11 14:15:54 +01:00
Philip Withnall
fcc1367383 Merge branch 'gtkdoc-check-fix' into 'master'
Various gtk-doc improvements

See merge request GNOME/glib!1277
2019-12-11 13:02:20 +00:00
Philip Withnall
2f6010eabf Merge branch 'wip/hadess/add-dbus-tests-debug' into 'master'
tests: Enable GDBus debug for a number of unreliable tests

See merge request GNOME/glib!1271
2019-12-11 12:52:55 +00:00
Philip Withnall
cedeccec85 Merge branch 'wip/hadess/add-memory-monitor' into 'master'
gio: Add GMemoryMonitor to monitor for low-memory

See merge request GNOME/glib!1005
2019-12-11 12:31:53 +00:00
Philip Withnall
7a3c4a415c gtask: Fix GIR annotation
Spotted by gtk-doc.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-11 12:30:47 +00:00
Xavier Claessens
df4fb2cd32 Revert "docs: remove GDBusObjectManager example"
This reverts commit 398c048c66.

It got removed because it used to cause build issues, but now that we
have a CI let's hope it won't be a problem any more.
2019-12-11 12:16:27 +00:00
Philip Withnall
fa4cbfdd94 glib: Sort #includes in top-level header files
This should shut the code style checker up every time someone adds a new
`#include`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-11 11:48:41 +00:00
Bastien Nocera
9ea7947e22 tests: Disable another timeout test by default
Don't run this timeout test unless "thorough" tests are requested.

See commit 3894335dc6
2019-12-11 11:44:42 +00:00
Bastien Nocera
8e8ee82580 tests: Add GMemoryMonitor installed-tests
Those tests require Python, gobject-introspection and python-dbusmock
making them unsuitable to be run within the uninstalled test suite.

There are no restrictions of dependencies when it comes to installed
tests so use those to exercise GMemoryMonitor.
2019-12-11 11:44:42 +00:00
Bastien Nocera
ae26695843 ci: Add dependencies for newer installed tests 2019-12-11 11:44:42 +00:00
Bastien Nocera
e08b10e997 gio: Add stub test program for GMemoryMonitor
"memory-monitor --watch" will watch over any events coming from either
low-memory-monitor or the portal.
2019-12-11 11:44:42 +00:00
Bastien Nocera
cd6612dfb7 gio: Add GMemoryMonitor to monitor for low-memory
Add a memory monitor object, with D-Bus and Portal based
implementations. The D-Bus implementation uses the Linux-only
low-memory-monitor Freedesktop project.

Low Memory Monitor D-Bus API:
https://hadess.pages.freedesktop.org/low-memory-monitor/

Android API:
https://developer.android.com/reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)

iOS API:
https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle/responding_to_memory_warnings

Win32 API:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.systemevents.lowmemory?view=netframework-4.8

Tizen API:
https://samsung.github.io/TizenFX/master/api/Tizen.Applications.EventManager.SystemEvents.LowMemory.html
2019-12-11 11:44:42 +00:00
Philip Withnall
8f5d2c370d Merge branch 'gdate-copy-fixes' into 'master'
gdate: Add autoptr support

See merge request GNOME/glib!1256
2019-12-11 11:02:42 +00:00
Philip Withnall
57409724c6 Merge branch 'trash-portal-symlinks' into 'master'
trash portal: Don't follow symlinks

See merge request GNOME/glib!1274
2019-12-11 10:51:15 +00:00
Philip Withnall
37449ce072 Merge branch 'actiongroup-docs' into 'master'
Small doc correction

See merge request GNOME/glib!1275
2019-12-11 10:49:43 +00:00
Bastien Nocera
145dc5a49e gdbus: Fix runtime warning with debug enabled
With debug enabled, g_dbus_connection_call_done() will throw a
g_warning() if the call failed (on purpose or not) while trying to the
serial of a non-existant reply.

(/builds/GNOME/glib/_build/gio/tests/gdbus-connection:26921): GLib-GIO-CRITICAL **: 10:10:16.311: g_dbus_message_get_reply_serial: assertion 'G_IS_DBUS_MESSAGE (message)' failed
2019-12-11 11:42:03 +01:00
Bastien Nocera
8fd71dccc5 tests: Enable GDBus debug for a number of unreliable tests
As those tests keep failing in the CI, enable GDBus debugging to catch
some debug leads when the problems happen.
2019-12-11 11:04:10 +01:00
Bastien Nocera
5ed4e18bdf Merge branch 'wip/hadess/log-successful-installed-tests' into 'master'
ci: Work-around successful installed tests having no logs

See merge request GNOME/glib!1268
2019-12-11 10:02:11 +00:00
Bastien Nocera
8520163bdf ci: Work-around successful installed tests having no logs
This works around a bug in gnome-desktop-testing.

See: https://gitlab.gnome.org/GNOME/gnome-desktop-testing/merge_requests/2
2019-12-11 10:32:13 +01:00
Matthias Clasen
c3ab139841 trash portal: Don't follow symlinks
We got a complaint here that trashing via the
portal deletes the target of a symlink, not the
symlink itself. It turns out that following the
symlink already happens on the glib side.

https://github.com/flatpak/xdg-desktop-portal/issues/412
2019-12-10 15:16:33 -05:00
Matthias Clasen
1503cfa36e Small doc correction
Add a transfer annotation to some GActionGroup apis.
2019-12-10 15:15:13 -05:00
Marco Trevisan (Treviño)
d407b9e705 testgdate: Exit with failure if there are not passed tests 2019-12-10 17:58:16 +01:00
Marco Trevisan (Treviño)
c08d58d778 glib-autocleanups: Define the cleanup function for GDate
Add an autoptr test as well.
2019-12-10 17:58:16 +01:00
Philip Withnall
f3de395812 Merge branch 'wip/hadess/check-g_variant_get-args' into 'master'
gvariant: Add guard to g_variant_get()

See merge request GNOME/glib!1269
2019-12-05 09:29:02 +00:00
Bastien Nocera
43d3d49234 gvariant: Add guard to g_variant_get()
Even if g_variant_get_va(), which we eventually call, checks on the
validity of the value argument, check it early to avoid surprises, such
as this intermittent FreeBSD test failure:
(/var/tmp/gitlab_runner/builds/3fe11159/0/GNOME/glib/_build/gio/tests/gdbus-connection:65788): GLib-CRITICAL **: 15:13:25.670: g_variant_get_va: assertion 'value != NULL' failed
2019-12-04 18:38:16 +01:00
Philip Withnall
75e29305b8 Merge branch 'wip/hadess/installed-tests' into 'master'
ci: Run installed-tests on Fedora

See merge request GNOME/glib!1230
2019-12-04 13:28:48 +00:00
Bastien Nocera
7ec118f93a ci: Log successes for installed-tests as well
Use newer version of gnome-desktop-testing to log test results even if
successful.
2019-12-04 14:06:23 +01:00
Bastien Nocera
3a3382c275 tests: Don't skip static-link test
Set GLIB_TEST_COMPILATION=1 envvar so that the static-link test is run.
2019-12-04 14:06:23 +01:00
Bastien Nocera
4d4ff213f2 tests: Correct static-link.py skipped status
Skipped tests use "77" as the return value, so return 77 instead of 0
when the static-link.py test gets skipped because of a missing
environment variable.
2019-12-04 14:06:23 +01:00
Bastien Nocera
fc95385627 tests: Don't run tests that require fuse on rootless containers
If the fuse module is loaded but /dev/fuse doesn't exist, it's likely
that we're running in a rootless container, or a badly setup one, and we
won't be able to use fuse, so skip this test.

This happened on my local system using podman running as a normal user,
but this apparently works as expected in our CI[1].

[1]: https://gitlab.gnome.org/GNOME/glib/merge_requests/466
2019-12-04 14:06:23 +01:00
Bastien Nocera
ead670b1c4 ci: Run installed-tests on Fedora
Run installed-tests on a Fedora system.
2019-12-04 14:06:23 +01:00
Philip Withnall
6e95232b47 Merge branch 'gtkdoc-revert' into 'master'
Revert "doc: Workaround gtkdoc-scan bug leading to undocumented symbols"

See merge request GNOME/glib!1267
2019-12-04 12:53:12 +00:00
Xavier Claessens
4c4669f04d Revert "doc: Workaround gtkdoc-scan bug leading to undocumented
symbols"

This reverts commit 9b7332ce2e.
2019-12-03 09:25:12 -05:00
Philip Withnall
b698327b99 Merge branch 'cherry-pick-6ea0dcc6' into 'master'
doc: Add missing --ignore-decorators

Closes #1953

See merge request GNOME/glib!1260
2019-12-03 12:48:37 +00:00
Philip Withnall
a721761e5a Merge branch 'gtkdoc-dep' into 'master'
gtk-doc: Ensure we have recent enough version

See merge request GNOME/glib!1261
2019-12-03 12:46:35 +00:00
Sebastian Dröge
96a0f3777c Merge branch 'gsource-dispose' into 'master'
Implement a dispose function for GSource

See merge request GNOME/glib!1175
2019-12-03 12:37:22 +00:00
Sebastian Dröge
e315918f52 Minor cleanups in mainloop tests 2019-12-03 14:00:59 +02:00
Sebastian Dröge
eeb4ad8b1e Merge branch 'visibility-protected' into 'master'
build: don't check for protected visibility

See merge request GNOME/glib!1265
2019-12-03 09:44:46 +00:00
Matthew Waters
86747cea08 build: don't check for protected visibility
It's not supported on macOS' clang compiler and will fail the visibility
check and thus make the G_GNUC_INTERNAL attribute do nothing.

Compiler stderr:
 /var/folders/nt/j2v2x4wd5cl33fq27mm31mwc0000gn/T/tmpxxf2zzi_/testfile.c:13:19: error: target does not support 'protected' visibility; using 'default' [-Werror,-Wunsupported-visibility]
  __attribute__ ((visibility ("protected")))
                  ^
1 error generated.

Checking if "GNU C visibility attributes test" compiles: NO
2019-12-03 13:33:16 +11:00
Simon McVittie
32c84b076d Merge branch '1612-gdbus-codegen-tests' into 'master'
tests: Add tests for the gdbus-codegen executable

See merge request GNOME/glib!1262
2019-12-02 15:07:16 +00:00
Philip Withnall
41cabfaa98 tests: Add tests for the gdbus-codegen executable
Add a Python-based test wrapper for the `gdbus-codegen` executable,
similar to the existing tests for `glib-mkenums` and friends.

Add a few basic tests to begin with, but this doesn’t approach anywhere
near full coverage.

The next step is to move the existing Meson-based `gdbus-codegen` tests
from `gio/tests/meson.build` into the Python test suite.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1612
2019-12-02 14:27:11 +00:00
Philip Withnall
8f4155c124 codegen: Require at least one interface file to be specified
Previously, running `gdbus-codegen` with no arguments would exit
successfully with no output. While technically correct, that seems
unhelpful.

Require at least one interface file to be specified, so the user gets an
error message if they don’t specify any.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-02 14:09:45 +00:00
Philip Withnall
921e6d1245 codegen: Drop gdbus-codegen version and input filename from output
It’s not particularly useful to put the gdbus-codegen version or the
name of the input file into the output from `gdbus-codegen`, and it
makes the output less reproducible. Drop it.

Also clarify the licensing.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1612
2019-12-02 14:09:45 +00:00
Xavier Claessens
160143ae27 gtk-doc: Ensure we have recent enough version
Older versions won't produce errors, but will silently miss
documentation for a few symbols.
2019-12-01 08:25:04 -05:00
Sebastian Dröge
470f872af9 Add test for GSource finalization, disposal and recycling from dispose() 2019-11-29 21:01:57 +01:00