aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2022-03-07Add support for rust proc-macro cratesDylan Baker4-1/+35
2022-03-07Merge pull request #10043 from dcbaker/submit/type-checking-for-subprojectJussi Pakkanen2-2/+2
Add typing for subproject()
2022-03-07Fix default install tag for shared lib symlinksXavier Claessens1-0/+6
Versioned shared libraries should have .so file in devel, .so.1 and .so.1.2.3 in runtime. Fixes: #9811
2022-03-07Merge pull request #9743 from mensinda/cmakeGeneratorFixedJussi Pakkanen3-0/+47
cmake: Add TARGET_ generator expression support (fixes #9305)
2022-03-06find_program: add a version() method to match the one for dependenciesEli Schwartz1-0/+3
It is often useful to check the found version of a program without checking whether you can successfully find `find_program('foo', required: false, version: '>=XXX')`
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-03-06wayland module: Allow building both client and server sidesXavier Claessens9-41/+57
- Change `scope` kwarg to `public` boolean default to false. - Change `side` kwarg to `client` and `server` booleans. - Document returned values - Aggregate in a single unit test because have lots of small tests increases CI time. Fixes: #10040.
2022-03-04Add modules kwarg to JNI system depTristan Partin1-1/+1
This allows someone to link against libjvm.so and libjawt.so.
2022-03-03interpreter: use typed_kwargs for subproject()Dylan Baker2-2/+2
2022-03-03ignore dub.json in test "d/11 dub"Remi Thebault1-0/+1
2022-03-03add test d/13 declare depRemi Thebault3-0/+29
2022-03-02Rename JDK system dep to JNITristan Partin10-52/+52
JNI is a more apt name because it currently only supports the JNI. I also believe that CMake uses the terminology JNI here as well. JNI is currently the only way to interact with the JVM through native code, but there is a project called "Project Panama" which aims to be another way for native code to interact with the JVM.
2022-03-01Deprecate java.generate_native_header() in favor of ↵Tristan Partin2-2/+3
java.generate_native_headers() After implementing a much more extensive Java native module than what currently exists in the tests, I found shortcomings. 1. You need to be able to pass multiple Java files. 2. Meson needs more information to better track the generated native headers. 3. Meson wasn't tracking the header files generated from inner classes. This new function should fix all the issues the old function had with room to grow should more functionality need to be added. What I implemented here in this new function is essentially what I have done in the Heterogeneous-Memory Storage Engine's Java bindings.
2022-02-28Allow setting method/separator in environment() and meson.add_devenv()Xavier Claessens2-1/+6
2022-02-28devenv: Set PYTHONPATH where we install python modulesXavier Claessens5-1/+36
2022-02-27test cases/vala: Fix test 14Mark Bolhuis1-1/+1
2022-02-27modules/wayland: Add unstable_wayland moduleMark Bolhuis7-0/+76
2022-02-27cmake: configure_package_config_file can now take a dictAndrea Pappacoda1-3/+1
2022-02-17test cases: rename shared library('c') avoid libc collisionEli Schwartz5-5/+10
In a bunch of cases we create a series of sample libraries named "a", "b", "c" etc. This breaks on musl. Originally reported with muon via commit https://git.sr.ht/~lattis/muon/commit/ca5c37171423e9884047a85349e1b236d7449510 and also breaks the testsuite when packaging meson for alpine linux. libc.so is an existing library which is linked in by default for all the obvious reasons. You can get away with this on glibc, because that includes a soversion of "6", but it loads the wrong library on musl.
2022-02-17tests: do not use a GNU bash script to check the minimum version of programsEli Schwartz2-10/+1
find_program() can check that for us already, there's no need to require GNU bash on systems that default to other POSIX shells. Even though this is the *linuxlike* tests and a POSIX shell is guaranteed, there is actually no need to require a shell at all. It's *easier* to use the meson builtin functionality here.
2022-02-15pkgconfig module: allow custom variables to reference builtin directoriesEli Schwartz2-1/+30
Automatically generate additional variables and write them into the generated pkg-config file. This means projects no longer need to manually define the ones they use, which is annoying for dataonly usages (it used to forbid setting the base library-relevant "reserved" ones, and now allows it only for dataonly. But it's bloat to manualy list them anyway). It also fixes a regression in commit 248e6cf4736ef9ec636228da66c28f9be03aa74f which caused libdir to not be set, and to be unsettable, if the pkg-config file has no libraries but uses the ${libdir} expansion in a custom variable. This could be considered likely a case for dataonly, but it's not guaranteed.
2022-02-10ninjabackend: fix rust program names with dashesAlyssa Ross3-6/+6
This substitution matches the behaviour of rustc[1] when inferring crate name based on file name. [1]: https://github.com/rust-lang/rust/tree/4e8fb743ccbec27344b2dd42de7057f41d4ebfdd/compiler/rustc_session/src/output.rs#L88
2022-02-09meson: Allow directory options outside of prefixJan Tojnar2-16/+0
This bring us in line with Autotools and CMake and it is useful for platforms like Nix, which install projects into multiple independent prefixes. As a consequence, `get_option` might return absolute paths for some directory options, if a directory outside of prefix is passed. This is technically a backwards incompatible change but its effect should be minimal, thanks to widespread use of `join_paths`/`/` operator and pkg-config generator module. It should only cause an issue when a path were constructed by concatenating the value of directory path option. Also remove a comment about commonpath since we do not use that since <https://github.com/mesonbuild/meson/commit/00f5dadd5b7d71c30bd7393d165a87f554eb92e5>. Fixes: https://github.com/mesonbuild/meson/issues/2561
2022-02-06dlang: add test case for root include_directory #9250Tobias Pankrath4-0/+23
2022-02-03cmake: ci: Skip tests on Ubuntu Bionic where CMake is stuck on 3.10Daniel Mensinger5-4/+21
2022-02-02Merge pull request #9834 from bonzini/test-verbose-kwargJussi Pakkanen1-1/+1
New keyword argument `verbose` for tests and benchmarks
2022-02-02ninjabackend: treat link_whole_targets like link_targets for Rust targetsZach Reizner5-0/+27
For static library crates that depend on other internal static library crates, all link_with targets get promoted to link_whole targets. Due to a bug, only link_with targets are considered when generating a Rust target for the ninja backend. This made it impossible to link a Rust static library with another internal Rust static library. This change fixes that issue by chaining link_whole_targets with link_targets, just like many other languages within the ninja backend.
2022-02-01unittests: check that "verbose: true" works on testsPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-02-01Fix dep.get_variable() with empty string default_valueXavier Claessens2-0/+10
2022-01-28build: replace kwargs in CustomTarget initializerDylan Baker1-1/+1
Because we don't want to pass the Interpreter kwargs into the build layer. This turned out to be a mega commit, as there's really on elegant way to make this change in an incremental way. On the nice side, mypy made this change super easy, as nearly all of the calls to `CustomTarget` are fully type checked! It also turns out that we're not handling install_tags in custom_target correctly, since we're not converting the boolean values into Optional values!
2022-01-27add location data to various Feature checksEli Schwartz1-1/+1
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-26compilers/c_function_attributes: add retainArsen Arsenović1-0/+6
retain is a relatively young attribute which has proven itself useful for working with --gc-sections -z start-stop-gc.
2022-01-23cmake: require CMake 3.19 to get rid of Whitelist restrictionsDaniel Mensinger1-0/+5
2022-01-23cmake: Add TARGET_ generator expression support (fixes #9305)Daniel Mensinger2-0/+42
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-18interpreterobjects: use typed_* for configuration_data.set*Dylan Baker2-10/+1
This removes the ability to use ConfigurationData as a dict, but restricting the inputs to `str | int | bool`. This may be a little too soon for this, and we may want to wait on that part, it's only bee 8 months since we started warning about this.
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-15Fix system include arguments for clang-clGatgat3-0/+20
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-15tests: Add a regression test for vapigen metadatadirNirbheek Chauhan2-0/+8
https://github.com/mesonbuild/meson/pull/9806
2022-01-12subproject: fix version validation on lookupØyvind Aarrestad Aakre4-0/+18
Fixes a bug where the subproject version was not validated when the subproject had already been processed. The bug would cause inconsistent build results if the subproject was referenced more than once (diamond) with conflicting version requirements.
2022-01-07Fix typo.Itoh Shimon1-1/+1
2022-01-02Condense test directory numbers for rc1.Jussi Pakkanen77-11/+11
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-22unit tests: Don't check quoting with multiple libsNirbheek Chauhan1-0/+1
pkgconf has a bug on MSYS2 due to which prefixes with spaces are not handled correctly if the library has a Requires: on another library and both have prefixes with spaces in them. See: https://github.com/pkgconf/pkgconf/issues/238 So move the unit test to libanswer.pc instead of libfoo.pc till that is fixed.
2021-12-22Set RPATH for all non-system libs with absolute pathsNirbheek Chauhan4-3/+22
If a pkg-config dependency has multiple libraries in it, which is the most common case when it has a Requires: directive, or when it has multiple -l args in Libs: (rare), then we don't add -Wl,-rpath directives to it when linking. The existing test wasn't catching it because it was linking to a pkgconfig file with a single library in it. Update the test to demonstrate this. This function was originally added for shared libraries in the source directory, which explains the name: https://github.com/mesonbuild/meson/pull/2397 However, since now it is also used for linking to *all* non-system shared libraries that we link to with absolute paths: https://github.com/mesonbuild/meson/pull/3092 But that PR is incomplete / wrong, because only adding RPATHs for dependencies that specify a single library, which is simply inconsistent. Things will work for some dependencies and not work for others, with no logical reason for it. We should add RPATHs for *all* libraries. There are no special length limits for RPATHs that I can find. For ELF, DT_RPATH or DT_RUNPATH are used, which are just stored in a string table (DT_STRTAB). The maximum length is only a problem when editing pre-existing tags. For Mach-O, each RPATH is stored in a separate LC_RPATH entry so there are no length issues there either. Fixes https://github.com/mesonbuild/meson/issues/9543 Fixes https://github.com/mesonbuild/meson/issues/4372