aboutsummaryrefslogtreecommitdiff
path: root/test cases/frameworks
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-09-08Override config-tool get_variable args for qmakeNirbheek Chauhan1-0/+3
2023-09-06qt module: add include_directories to moc compileCharles Brunet4-3/+15
Fixes #12182
2023-08-30ci: Skip gir test on cygwinXavier Claessens2-1/+7
2023-08-29gnome: Fix crash in gtkdoc and generate_gir in C++ projectsXavier Claessens9-0/+77
gtkdoc() and generate_gir() methods assumes there is a C compiler, but pure C++ projects might not add it explicitly. Fixes: #12162
2023-07-23hdf5 tests: make cpp test actually use cpp HDF5George Sedov1-19/+9
the previous version didn't even link to libhdf5_cpp.so
2023-07-18tests: bump the C++ std for protobuf testsEli Schwartz1-1/+1
Based on https://opensource.google/documentation/policies/cplusplus-support Google no longer supports C++11, and protobuf spawns an `#error` if you don't have at least 14. So, perform our currently scheduled automatic bump.
2023-07-18tests: mark gpgme test skippable on Ubuntu rollingEli Schwartz1-1/+1
It has been rebuilt to no longer provide the deprecated gpgme-config tool.
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-06-07tests: remove unnecessary non-meson syntax from meson.buildEli Schwartz1-2/+2
We don't use parentheses for the if function, because it's not a function.
2023-06-07tests: update llvm version exclusions for hopefully the last timeEli Schwartz1-6/+4
This is now fixed upstream and expected to be backported to the next point release.
2023-06-07tests: be DRY in llvm framework testEli Schwartz1-14/+15
It's a lot more readable to not repeat big arrays.
2023-06-07tests: avoid hard to debug error when llvm is found with only one methodEli Schwartz1-1/+1
In commit 89146e84c9eab649d3847af101d61047cac45765 we added some complicated code to verify the llvm framework's "combination" matrix lookup. It expects to find llvm with both cmake and config-tool, with the same version. But the sanity check is wonky -- it checks that both have the same found status, instead, so if both are not found then we proceed to try to convert the string "unknown" to a mapping of semver integers, and this is guaranteed to fail. This can happen for example if the system llvm exists in the general case, but actual modules cannot be found because the system llvm does not distribute static modules. For example, this is the case on Gentoo. Abort more obviously by just insisting that both be found. If they aren't both found, then investigative efforts know to look at why they weren't found.
2023-05-23llvm: Bump broken micro version for CINirbheek Chauhan1-2/+2
16.0.4 didn't fix the LLVM breakage.
2023-05-23qt: Allow specifying separate tools for qt4/5/6Nirbheek Chauhan1-1/+2
Currently you can only use one of qt4, qt5, qt6 in a single project when using a machine file because the config-tool lookup for qt only looks at `qmake` in the machine files, instead of looking up the binary names directly. Allow specifying `qmake` `qmake4` `qmake5` and `qmake6`. This is necessary for gstreamer, which can build separate qt5 and qt6 plugins that are distributed as static libraries, so the user can pick which one to use.
2023-04-26Add env kwarg to gnome.generate_gir().Volker Weißmann7-11/+18
Fixes #384
2023-04-24ci: Don't search for llvm modules with LLVM 16.0.xNirbheek Chauhan1-16/+40
See: https://github.com/mesonbuild/meson/issues/11642
2023-04-24dependencies: allow to fallback on CMake to find the SDL2 libraryMatthieu Bouron2-2/+3
On Windows, the SDL2 library is generally provided with only CMake config files. This commit allows meson to fallback on CMake as a last resort to find the SDL2 library.
2023-04-11fix various spelling issuesJosh Soref7-7/+7
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26tests: fix critical existence failure of doxygen testEli Schwartz3-4/+4
It was totally subproject-unsafe, and setting a super bad example. This is bad, because doxygen is annoying to get right and we occasionally tell people to go use our example test case. There is a fun nuance here, that makes doxygen unpredictably work on some versions, and fail on others. Specifically, values must be quoted in doxygen 1.8, but not in doxygen 1.9, or they break -- but only if the output directory contains spaces. This was "fixed" in commit https://github.com/doxygen/doxygen/commit/ef91bacb7a69bbf7bccb4a864698cc003aabac66 which actually caused it to act like an unquoted OUTPUT_DIRECTORY is not provided at all, and then fixed for real in commit https://github.com/doxygen/doxygen/commit/eb3d1eb5ad85c94d6f2c32934fce2b8630331d6c For portability, it is necessary to quote this just to be on the safe side. Fixes #11579
2023-02-13add a CI runner testing that Meson runs correctly under PyPy3Eli Schwartz2-2/+2
Silence a couple of framework tests that need to be skipped since we don't install their dependencies for pypy3.
2023-02-08CI: skip gpgme-config test on ArchEli Schwartz1-1/+1
gpgme has decided that config-tool is bad, which makes sense. They've also decided that they will only install theirs, if gpg-error also installs one, which is a bit... confusing. Anyway, it's impossible to know whether it should or should not exist, so just accept that this test is ready to be skipped on distros that currently no longer have this ancient config-tool script. Victory is within reach!
2023-01-28tests/llvm: require cmake 3.11Konstantin1-1/+4
This is a weird but working way to skip this test from running on bionic (where it should not run).
2023-01-28cmake: allow dynamic linking with LLVMKonstantin3-45/+85
llvm-config is unsuitable for standard cross-compile, because we need to build llvm especially for it, which is not done is almost any distros, so, for example, standard bootstrap chroot will be unsuitable. This patch is trying to acheive feature parity between config-tool searching of LLVM and CMake-based one, which is arch-agnostic. Signed-off-by: Konstantin <ria.freelander@gmail.com>
2022-12-11CI: skip libgcrypt test on msys2Eli Schwartz1-1/+1
This is no longer implicitly installed due to libxslt. Actually though, we don't need to test this in order to ensure that the custom dependency works -- we have other jobs that test it, and the config-tool handling itself won't suddenly fail on msys2 specifically.
2022-11-17tests: fix qt project test when running with qt4Eli Schwartz1-1/+1
*.qrc files converted to C++ sources could make use of Qt headers, and in practice for qt4 they seem to. Since this is Qt code to begin with, it makes sense to depend on the Qt being targeted regardless of version.
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-08-17tests: fix targets with no sourcesDylan Baker2-1/+1
This was never supposed to be possible, so stop doing it.
2022-06-19update gnome test to cover built gresource filesEli Schwartz3-4/+29
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2022-04-12qt dependency: find the correct -qtX configtool nameEli Schwartz1-2/+2
Fixes regression in commit c211fea51389728783cf59ae41156a5e0de9c41a. The original dependency lookup looked for `qmake-{self.name}`, i.e. `qmake-qt5`, but when porting to config-tool, it got switched to `qmake-{self.qtname}` i.e. `qmake-Qt6`, which was bogus and never worked. As a result, if `qmake-qt5` and `qmake` both existed, and the latter was NOT qt5, it would only try the less preferred name, and then fail. We need to define self.name early enough to define the configtool names, which means we need to set it before running the configtool __init__() even though configtool/pkgconfig would also set it to the same value. Mark the tests as passing on two distros that were failing to detect qmake due to this issue, and were marked for skipping because we assumed that the CI skipping there was an expected case rather than an old regression.
2022-04-12tests: fix incomplete Qt 6 supportStefan Hajnoczi4-3/+33
The "frameworks/4 qt" test covers Qt 4 and 5. There is already Qt 6 code in the test but it is incomplete because translations are missing and Qt 6 requires C++17 or later to compile.
2022-03-29gnome: Fix gtkdoc when using multiple Apple frameworksJan Tojnar2-1/+7
The `-framework Foundation -framework CoreFoundation` ended up de-duplicated by OrderedSet into `-framework Foundation CoreFoundation`.
2022-03-06i18n module: fix bug that made msgfmthelper die on combinations of argsEli Schwartz2-0/+2
Due to misuse of argparse in commit 82492f5d765b70cc87385fb887008df89fac878e it was impossible to use both --datadirs and extra args passed directly to msgfmt at the same time. I'm not sure anyone actually knows how argparse works, so misusing it is easy. What is definitely known is that argparse is NOT a POSIX compliant parser and doesn't behave the way you'd expect a standards based parser to handle options. Instead it caters to the easy use case, and hopes and prays you don't need to do anything too complicated "with the wrong kind of complicated". Apparently, this particular type of complicated is when you have mixed option_arguments and operands while simultaneously passing some operands as nargs after a --. It totally breaks, and interprets --datadirs, which is supposed to be an option_argument, as an operand, eats it up as a msgfmt wrapped argument, and breaks. But if you don't pass additional arguments with -- then it interprets --datadirs after operands as an option_argument. This is what we were doing. Instead pass option_arguments before all operands (including the ones specified via `-- ...`). Add test case to pass meaningless datadirs (we don't actually care if $GETTEXTDATADIRS is set to something that doesn't contain gettext data).
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-22Merge pull request #9742 from ximion/wip/itstoolJussi Pakkanen9-2/+127
i18n: Add support for joining XML localization via itstool
2022-01-21i18n: Add support for joining XML localization via itstoolMatthias Klumpp9-2/+127
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 a partial test for gtk_doc check: kwargNirbheek Chauhan1-1/+2
check: true is needed for an actual regression test, but that requires a pedantically correct gtk-doc configuration, which I attempted to do and failed. So let's just put check: false so we get *some* coverage: just that typed_kwargs accepts the argument. Related to https://github.com/mesonbuild/meson/pull/9807
2022-01-15tests: Add regression tests for gdbus_codegen argsNirbheek Chauhan2-1/+22
https://github.com/mesonbuild/meson/pull/9812
2022-01-15tests: Add a regression test for gtk-doc argumentsNirbheek Chauhan5-0/+14
gobject_typesfile html_assets https://github.com/mesonbuild/meson/pull/9807
2022-01-02test cases/frameworks/13 yelp: Do not reuse sources filesPablo Correa Gómez4-8/+24
Additionally reorder test.json for better readability
2021-12-06gnome module: deprecate passing false to install_dir_girEli Schwartz3-5/+11
Use a proper install option for this. Now `install_<type>` can directly override `install` instead of passing a boolean to the string kwarg `install_dir_<type>`.
2021-12-06gnome module: document and fix install_dir x3, by allowing false *_gir and ↵Eli Schwartz2-3/+3
*_typelib generate_gir forces building both the typelib and gir, and some people only want one or the other (probably only the typelib?) which means flagging the other as install_dir: false in the same way custom_target supports. As this always worked, albeit undocumented, make sure it keeps working. It's pretty reasonable to allow, anyway. Fixes https://github.com/mesonbuild/meson/pull/9484#issuecomment-980131791
2021-11-20Update expected skip condition for llvm framework test on msys2Jon Turney1-1/+1
On msys2, we will now find static llvm using cmake
2021-10-30Added warning if run_command is called without the check kwargVolker Weißmann3-4/+4
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-09-29unittests: Make qt test work if multiple versions of qt installedmakise-homura1-1/+1