summaryrefslogtreecommitdiff
path: root/test cases/frameworks/7 gnome
AgeCommit message (Collapse)Author
2025-06-09modules/gnome: Allow to generate markdown and reStructuredText dbus docCorentin Noël
gdbus-docgen supports reStructuredText output since 2.71.1 and markdown since 2.75.2, allow to simply generate it.
2025-04-09gnome: Add a test consuming PythonL. E. Segovia
2025-03-01modules/gnome: Allow to specify the doc-format argumentCorentin Noël
Add the support for the doc-format argument if g-ir-scanner supports it. Ignore the argument otherwise as this is a no-op in such cases.
2024-12-19replace cmake configuration workaround with a straight copyJan200101
2024-04-08gnome: Actually run all mkenums_simple tests and fix numberingMatthijs Velsink
Some tests for `gnome.mkenums_simple` were only compiled, but not run. Most bugs will be caught by compilation alone, but it's better to run the generated binary too in case there are runtime issues in the generated code. The naming of all enum tests is now unified as well.
2024-03-17tests: rename skip_on_jobname to expect_skip_on_jobname and skip_on_os to ↵Christoph Reiter
expect_skip_on_os The test.json format currently has three keys related to skipping tests: * `skip_on_jobname` * `skip_on_os` * `skip_on_env` While `skip_on_env` marks the test itself as skipped, i.e. they don't get run when the conditions are met, the other two skip options are just marking the test as "expected to be skipped" if the conditions apply, i.e. they want to see `MESON_SKIP_TEST` in the output and things will fail if that doesn't happen. They don't actually skip the tests as the names imply. To make this clearer rename the keys: * `skip_on_jobname` -> `expect_skip_on_jobname` * `skip_on_os` -> `expect_skip_on_os` `skip_on_env` stays the same, since that actually skips. The docs were also confused about this, so adjust that too.
2023-09-09gnome.mkenum_simple(): Fix include path when header is in subdirXavier Claessens
It was generating #include with the basename of every header file. That assumes that every directory where there are headers are also included into search path when compiling the .c file. Change to use path relative to current subdir, which can be both in build or source directory. That means that we assume that when the .c file is compiled, the target has a include_directories pointing to the directory where gnome.mkenum_simple() has been called, which is generally '.' and added automatically. Also fix type annotation to only allow str and File sources, other types have never been working, it would require to iterate over custom target outputs, etc. Fixes: #7582
2023-07-18ci: Skip test_generate_gir_with_address_sanitizerXavier Claessens
It fails with glib >= 2.76 and gobject-introspection <= 1.76.1. Fixes: #11754
2023-04-26Add env kwarg to gnome.generate_gir().Volker Weißmann
Fixes #384
2023-04-11fix various spelling issuesJosh Soref
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-02-13add a CI runner testing that Meson runs correctly under PyPy3Eli Schwartz
Silence a couple of framework tests that need to be skipped since we don't install their dependencies for pypy3.
2022-10-28gnome: allow generator outputs as gdbus-codegen inputsPaolo Bonzini
GeneratedLists as sources to `gnome.gdbus_codegen` worked until version 0.60 of Meson, but broke in 0.61 because of the conversion to typed_pos_args and typed_kwargs. Reinstate this by adding them to the decorators and annotations. Note that gdbus_codegen desugars to two custom_targets and therefore the generator is invoked twice. This is not optimal, but it should not be an issue and can be changed later. Fixes: 53a187ba2 ("modules/gnome: use typed_pos_args for gdbus_codegen", 2021-11-01) Fixes: ef52e6093 ("modules/gnome: use typed_kwargs for gdbus_codegen", 2021-11-08)
2022-10-28gnome: allow custom targets as gdbus-codegen inputsPaolo Bonzini
Custom targets as sources to `gnome.gdbus_codegen` worked until version 0.60 of Meson, but broke in 0.61 because of the conversion to typed_pos_args and typed_kwargs. Reinstate this by adding custom targets to the decorators and annotations. While generators also used to work, they are a bit tricky because gdbus_codegen desugars to two custom_targets and therefore the generator is invoked twice. This should not be a problem, but be explicit and leave that to a separate commit to highlight the problem. Fixes: 53a187ba2 ("modules/gnome: use typed_pos_args for gdbus_codegen", 2021-11-01) Fixes: ef52e6093 ("modules/gnome: use typed_kwargs for gdbus_codegen", 2021-11-08)
2022-09-04Add missing cdata update in genmarshal testsJan Alexander Steffens (heftig)
Otherwise the test is flaky, as it may try to include a header that's not generated yet.
2022-09-03tests/7 gnome: Fix incorrect unref of GResourceNirbheek Chauhan
The returned GResource is transfer-none, since the generated function basically calls g_static_resource_get_resource(). It should not be unreffed. Causes an abort on Debian: GLib-GIO:ERROR:../../../gio/gresource.c:1451:g_static_resource_fini: assertion failed: (g_atomic_int_get (&resource->ref_count) >= 2)
2022-06-19update gnome test to cover built gresource filesEli Schwartz
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2022-01-27modules/gnome: Allow gdbus_annotations to take an empty list againDylan Baker
This was allows up to 0.61.0 (including with the initial type annotations), but was accidentally broken by fixes for other bugs in 0.61.1. Fixes: #9883
2022-01-15gnome.genmarshal: restore the ability to pass sources as Files objectsEli Schwartz
It used to support: - a single string - an array of anything And as long as CustomTarget supported it too, everything worked fine. So, a `files('foo')` worked but a `files('foo')[0]` did not, which is silly... and it's not exactly terrible to use files() here, the input is literally a list of source files. Fixes building gnome-terminal Fixes #9827 Test updated by Nirbheek Chauhan <nirbheek@centricular.com>
2022-01-15tests: Add regression tests for gdbus_codegen argsNirbheek Chauhan
https://github.com/mesonbuild/meson/pull/9812
2021-10-30Added warning if run_command is called without the check kwargVolker Weißmann
2021-10-27modules/gnome: ensure that `install_dir` is setDylan Baker
The `mkenums` functions can have this unset if, and only if, the c file only variant is called. Due to side effects if the header file is generated then `install_dir` is ensured to be set for the c file. I have removed this side effect so that our tests actually cover this case. Fixes #9472
2021-08-31pylint: turn on superflous-parensDylan Baker
We have a lot of these. Some of them are harmless, if unidiomatic, such as `if (condition)`, others are potentially dangerous `assert(...)`, as `assert(condtion)` works as expected, but `assert(condition, message)` will result in an assertion that never triggers, as what you're actually asserting is `bool(tuple[2])`, which will always be true.
2021-08-30decorators: Make unknown kwarg fatalXavier Claessens
2021-07-13Add expected skip annotations for non-linux CI runs to framework testsJon Turney
2021-05-28modules/gnome: Correctly handle generated sources for generate_girDylan Baker
We need to pass any generated sources down the CustomTarget inititalizers so that they will generate a dependency correctly, otherwise we get race conditions.
2020-11-17gnome: Drop use of volatile in GLib type functionsPhilip Withnall
See https://gitlab.gnome.org/GNOME/glib/-/issues/600 `volatile` was previously mistakenly used in GLib to indicate that a variable was accessed atomically or otherwise multi-threaded. It’s not meant for that, and up to date compilers (like gcc-11) will rightly warn about it. Drop the `volatile` qualifiers. Based on a patch by Jeff Law. See also http://isvolatileusefulwiththreads.in/c/. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-06-29test: fix enum generation for GNOMEMike Gorse
Fixes: #7252
2020-05-14gnome.generate_gir: Fix missing include directoriesXavier Claessens
This revert a part of #7020 because it was using gir_inc_dirs before it is set. Properly fix typelib_includes instead that was working only when g-i is a pkgconfig dependency.
2020-02-25test: merge installed_files.txt into test.jsonDaniel Mensinger
2020-01-24tests: Fix some test failures on Ubuntun 16.04 CINirbheek Chauhan
* xenial doesn't ship many dependencies, so make them all optional since we don't guarantee that everything will work * cmake/{5,6}: needs stdlib.h for EXIT_SUCCESS on GCC 5 * common/222: needs C++11, and GCC 5 doesn't understand `auto` correctly unless we explicitly enable it. * frameworks/1 boost: xenial doesn't ship boost_python3, so make it properly optional * frameworks/6 gettext: gettext can be installed without xgettext, which doesn't cause the project to fail, but the installed files list is different which causes the test to fail. * frameworks/7 gnome: gobject-introspection can't be enabled because the sanitizer unit test detects leaks in glib and fails
2018-10-10gnome.compile_resources: Put dependency directories before current source dirTingPing
This avoids the problem of generated files with the same name as something in source existing and using the wrong file.
2018-09-19Add some more implibs to list of installed files on cygwinJon Turney
Omitted from 0fc9a601 as these tests are skipped in CI
2018-09-14test cases: add missing files to installed_files.txtMarco Trevisan (Treviño)
All these are marked as files to be installed, so we need list them.
2018-08-09gnome.generate_gir: support generating gir for multiple librariesMathieu Duponchelle
Fixes #3688
2018-07-11gnome.gdbus_codegen: Handle XML docbook in subdirsNirbheek Chauhan
Closes https://github.com/mesonbuild/meson/issues/3870
2018-06-19Add more tests to ensure no future regressionCorentin Noël
2018-05-23gnome.mkenums: test header built from generated templateMathieu Duponchelle
2018-05-23gnome/mkenums: allow passing generated files as templatesMathieu Duponchelle
2018-05-05gnome: Use the header basename for #include in mkenums_simpleNirbheek Chauhan
Otherwise, when you use a File target, the value will be the full path to the header from the build root, which is not what anyone wants.
2018-05-04gnome: Disable usage of new --body and --header argsNirbheek Chauhan
The new --body and --header args are broken because they do not allow the use of --output-directory to set the correct `#include "foo.h"` line in `foo.c`. The changes in the gdbus test case show this. Disabled till this can be fixed in glib. Closes https://github.com/mesonbuild/meson/issues/3488
2018-04-28Install generated gdbus header with old glib version too.Jussi Pakkanen
2018-04-20gnome: gdbus-codegen add a `sources:` kwargNirbheek Chauhan
It accepts multiple XML files, not just one. For example, glib uses it that way.
2018-04-11gdbus_codegen: Return 2 targets when docbook is disabledNirbheek Chauhan
Also document this behaviour, test it, and fix the return value from the module -- we create one target and return it thrice to the build file
2018-04-09Never install the glib-mkenums generated C source (#3374)Emmanuele Bassi
* Never install the glib-mkenums generated C source When using gnome.mkenums_simple() we end up installing the generated C source file alongside the C header file, if `install_header` is set to True. This is caused by mkenums_simple() acting as a wrapper for mkenums() without template files; mkenums() won't be able to know if we're generating the header or the source, and will use the presence of `install_header` as the deciding factor as to whether the generated file should be installed. When generating the C source file, we should always unset the `install_header` option to False, just like mkenums() expects. Closes #3373 * Verify that mkenums_simple() does not install C sources When asked to installed the generated C header file.
2018-02-21Skip test cases/frameworks/7 gnome if prereqs not foundJon Turney
Skip test cases/frameworks/7 gnome if glib or python3-gi not found
2018-02-20pkgconfig deps: Warn when a static library isn't foundNirbheek Chauhan
A hard error makes this feature useless in most cases since a static library usually won't be found for every library, particularly system libraries like -lm. Instead, warn so the user can provide the static library if they wish. This feature will be expanded and made more extensible and more usable in the future. Closes https://github.com/mesonbuild/meson/issues/2785
2018-02-20gnome: Fix depend_files listing for compile_resourcesNirbheek Chauhan
Also add a unit test that will test all codepaths for old Glib tools versions. Closes https://github.com/mesonbuild/meson/issues/2860
2018-01-06Update PATH for python-gi tests on WindowsJon Turney
Update PATH for python-gi tests on Windows, since updating LD_LIBRARY_PATH has no effect
2018-01-06Fix installed files check for gobject-introspection tests on CygwinJon Turney
g-ir-scanner --no-libtool needed some fixes similar to [1] for Cygwin, as well. Now that is done, it's possible to make these tests run and pass on Cygwin. [1] https://bugzilla.gnome.org/show_bug.cgi?id=781525
2017-10-02Merge pull request #2375 from centricular/gnome-gir-fixesJussi Pakkanen
Fix GNOME gir generation with lists of dependency lists