aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
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-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
2021-12-22pkgconfig: Fix linking to a custom targetXavier Claessens2-0/+17
When generating pkgconfig file for a library that links to an uninstalled static library built by custom_target() Meson was crashing when trying to access some attributes that does not exist on that class. Also fix is_internal() implementation, it only really make sense on a CustomTargetIndex or if CustomTarget has only a single output.
2021-12-20restore additional info about the potential cause of find_program failingEli Schwartz1-1/+1
Before commit f08eed37cb69ba0d793c0f1d086eaef7f25c2ea3 we also mentioned that it might not be executable.
2021-12-15rewriter: create {add,rm}_extra_files commandsCeleste Wouters4-0/+282
Add ability to mutate a target's `extra_files` list through the rewriter. The logic is copied from sources add/rm, but changes the `extra_files` kwarg instead of the sources positional argument. Has additional logic to handle creating the `extra_files` list if it doesn't exist.
2021-12-09tests/rust polyglot: we need to link with bcrypt.lib as wellDylan Baker1-1/+1
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-12-06interpreter: allow extract_objects to receive generated sourcesPaolo Bonzini2-0/+18
Fixes: #8333
2021-12-06allow passing a CustomTargetIndex as argument to a testPaolo Bonzini2-2/+2
Fixes: #7585 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-06pass all outputs of a custom_target as arguments to a testPaolo Bonzini2-3/+6
Meson was passing only the first output and warning about it. To do this easily, refactor construct_target_rel_path to return a list. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-01cmake: Fix old style dependency lookup with imported targetsDaniel Mensinger2-0/+14
This also includes some refactoring, since the alternaticve would have been to duplicate the huge traceparser target code block again. fixes #9581
2021-12-01add install_symlink functionPablo Correa Gómez5-0/+27
Allows installing symlinks directly from meson, which can become useful in multiple scenarios. Current main use is to help moving forward #9557
2021-11-27Merge pull request #9599 from dcbaker/submit/typed_kwargs-message-improvementsJussi Pakkanen1-1/+1
Improve error messages for typed_kwarg type mismatches in containers
2021-11-25interpreter: fix `feature.require` handling of error messageBenoit Pierre3-0/+11
Don't show a blank error when no `error_message` was passed as argument.
2021-11-24shared_module: Add soname when used as a link targetNirbheek Chauhan3-1/+19
Emit a detailed deprecation warning that explains what to do instead. Also add a unittest. ``` DEPRECATION: target prog links against shared module mymod, which is incorrect. This will be an error in the future, so please use shared_library() for mymod instead. If shared_module() was used for mymod because it has references to undefined symbols, use shared_libary() with `override_options: ['b_lundef=false']` instead. ``` Fixes https://github.com/mesonbuild/meson/issues/9492
2021-11-24unit tests: Extend prebuilt test to test intermediateDylan Baker5-1/+47
This provides coverage for the bug: https://github.com/mesonbuild/meson/issues/9542
2021-11-23rust: clean up inputs and outputs to bindgenPaolo Bonzini4-0/+44
Make the handling of bindgen inputs consistent with the inputs and outputs of source_strings_to_files. However, for the first source argument reject anything that cannot possibly be an header file. This also fixes a mypy failure from the next patch, since ExtractedObjects does not have a zero-argument get_outputs method. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-22typed_kwargs: use | for type unions, not ,Dylan Baker1-1/+1
Python uses this syntax now, as does typescript and other languages
2021-11-22typed_kwargs: provide better error messages for wrong container typesDylan Baker1-1/+1
Currently, if you pass a `[]string`, but the argument expects `[]number`, then you get a message like `expected list[str] but got list`. That isn't helpful. With this patch arrays and dictionaries will both print messages with the types provided.
2021-11-20Feature kwargs decorator: automatically report the nodes which trigger an issueEli Schwartz1-1/+1
2021-11-20guard a complicated mlog.warning inside a Feature checkEli Schwartz1-1/+1
This is only relevant on certain versions of meson, so do not print it when meson_version is too low. The message itself is not precisely a deprecation warning, since ostensibly it may be an unlikely coding mistake. It is probably an attempt to implement `copy: true`, but it might not be, hence "warning" instead of "deprecation". So although we could switch this to a FeatureDeprecated, that is not being done at this time.
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