aboutsummaryrefslogtreecommitdiff
path: root/test cases/frameworks/7 gnome
AgeCommit message (Collapse)AuthorFilesLines
2023-09-09gnome.mkenum_simple(): Fix include path when header is in subdirXavier Claessens4-0/+22
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 Claessens1-0/+9
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ßmann7-11/+18
Fixes #384
2023-04-11fix various spelling issuesJosh Soref2-2/+2
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-02-13add a CI runner testing that Meson runs correctly under PyPy3Eli Schwartz1-1/+1
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 Bonzini2-0/+11
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 Bonzini4-2/+23
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)1-0/+3
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 Chauhan2-4/+3
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 Schwartz3-4/+29
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2022-01-27modules/gnome: Allow gdbus_annotations to take an empty list againDylan Baker1-0/+10
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 Schwartz3-17/+61
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 Chauhan2-1/+22
https://github.com/mesonbuild/meson/pull/9812
2021-10-30Added warning if run_command is called without the check kwargVolker Weißmann1-2/+2
2021-10-27modules/gnome: ensure that `install_dir` is setDylan Baker1-3/+3
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 Baker1-1/+1
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 Claessens1-4/+0
2021-07-13Add expected skip annotations for non-linux CI runs to framework testsJon Turney1-1/+2
2021-05-28modules/gnome: Correctly handle generated sources for generate_girDylan Baker2-1/+27
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 Withnall3-12/+12
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 Gorse1-0/+8
Fixes: #7252
2020-05-14gnome.generate_gir: Fix missing include directoriesXavier Claessens6-3/+175
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 Mensinger2-24/+28
2020-01-24tests: Fix some test failures on Ubuntun 16.04 CINirbheek Chauhan1-0/+5
* 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 dirTingPing1-0/+1
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 Turney1-0/+4
Omitted from 0fc9a601 as these tests are skipped in CI
2018-09-14test cases: add missing files to installed_files.txtMarco Trevisan (Treviño)1-0/+2
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 Duponchelle4-2/+79
Fixes #3688
2018-07-11gnome.gdbus_codegen: Handle XML docbook in subdirsNirbheek Chauhan2-2/+3
Closes https://github.com/mesonbuild/meson/issues/3870
2018-06-19Add more tests to ensure no future regressionCorentin Noël1-0/+4
2018-05-23gnome.mkenums: test header built from generated templateMathieu Duponchelle1-3/+14
2018-05-23gnome/mkenums: allow passing generated files as templatesMathieu Duponchelle1-0/+16
2018-05-05gnome: Use the header basename for #include in mkenums_simpleNirbheek Chauhan1-1/+1
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 Chauhan1-1/+7
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 Pakkanen2-1/+4
2018-04-20gnome: gdbus-codegen add a `sources:` kwargNirbheek Chauhan1-1/+2
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 Chauhan1-0/+10
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 Bassi2-0/+2
* 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 Turney1-0/+11
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 Chauhan1-0/+3
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 Chauhan2-1/+14
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 Turney1-0/+3
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 Turney1-3/+3
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 Pakkanen1-1/+1
Fix GNOME gir generation with lists of dependency lists
2017-10-01gnome: Add header kwarg to generate_gir()Patrick Griffis1-0/+1
This is a commonly used flag so lets make it more obvious.
2017-10-01tests/7 gnome: Test that GIR deps are flattenedNirbheek Chauhan1-1/+1
2017-09-12gnome: Docbook generation for gdbus_codegen()Iñigo Martínez1-1/+2
Add new 'docbook' argument which generates Docbook documentation for each D-Bus interface. The docbook argument will be used as prefix in `PREFIX`-NAME.xml pattern, and NAME will be replaced by the D-Bus interfaces.
2017-09-04gnome.gdbus_codegen(): Add annotations keywordPatrick Griffis1-1/+5
Fixes #2123
2017-08-14Printing unknown kwarg error message no longer crashes the parser.Jussi Pakkanen1-0/+4
2017-08-14gnome: add mkenums_simple()Tim-Philipp Müller4-0/+81
99% of all mkenums uses in C libraries use the same basic template, so add a mkenums_simple() function that takes care of everything for us based on that template. Features: - optional function declaration decorator such as GLIB_AVAILABLE - optional extra header prefix (e.g. for include needed for decorator) - optional extra body prefix (e.g. for additional includes) - optional function name prefix (e.g. to add leading underscores) Fixes issue #1384