summaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)Author
2025-10-04utils: merge per-platform utils into `platform.py`Dylan Baker
This allows us to simplify running mypy, as we can just mypy the entire utils module regardless of the platform we're using. As an added bonus, this means we open one less module.
2025-10-03rust: fix detection of main filePaolo Bonzini
If any dependency has "sources" in it, the file from the dependency might end up in the rustc command line. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-01format: fix handling whitespaces after string nodeCharles Brunet
Fixes #15019
2025-10-01Allow CustomTarget source for i18n.xgettextCharles Brunet
Fixes #15054
2025-09-24format: Fix indentation with parenthesesCharles Brunet
- Split long expressions in () according to max line length - Partly revert d028502 . Fixes #14935. - Fixes #15032.
2025-09-22rust: let doctests pick objects from dependenciesPaolo Bonzini
If a depedency includes object files, they have to be added to the doctest. However, NinjaBackend was not running flatten_object_list on the doctest. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-09-15Revert "test cases: do not pass global option on command line"Paolo Bonzini
This reverts commit 9b1eb8b8ed434d1c2fdca0d8ac46b79c9b91bb0f. It is not needed anymore since the pre-1.8 semantics were the good ones. Only leave in place the new and clearer testcase names.
2025-09-15Revert "tests: skip test common/223 in the -Ddefault_library=... jobs"Paolo Bonzini
This reverts commit 5ab871be5287aa5cce1e8dfdfb7c4a6b07b4f2f7. It is not needed anymore since the pre-1.8 semantics were the good ones.
2025-09-09msetup: not-found subprojects do not have known optionsPaolo Bonzini
If a subproject had its SubprojectHolder created, but was disabled, its options were not parsed; therefore the subproject should not be checked for unknown options. Fixes: #14969 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-29tests: add dict.values() testsMarvin Scholz
2025-08-29tests: add tests for the dict.keys() methodMarvin Scholz
2025-08-28python: add a python.build_config option (PEP 739)Filipe Laíns
Signed-off-by: Filipe Laíns <lains@riseup.net> Signed-off-by: Michał Górny <mgorny@quansight.com>
2025-08-26test cases/common/32 has header: disable undef with libcxxHaelwenn (lanodan) Monnier
Can be tested with adding -stdlib=libc++ to C++ flags. In file included from /usr/include/c++/v1/stdio.h:93: In file included from /usr/include/c++/v1/__config:14: In file included from /usr/include/c++/v1/__configuration/abi.h:15: /usr/include/c++/v1/__configuration/platform.h:35:7: error: function-like macro '__has_include' is not defined 35 | # if __has_include(<features.h>) | ^ /usr/include/c++/v1/__configuration/platform.h:48:5: error: function-like macro '__has_include' is not defined 48 | #if __has_include(<picolibc.h>) | ^ 1 warning and 2 errors generated. '
2025-08-26Set version, soversion from cmake if availableJulianne Swinoga
2025-08-26mformat: force multiline arguments with commaCharles Brunet
Force multiline arguments when there is a trailing comma. This is the behavior of muon. Fixes #14721.
2025-08-25fix transient failure on rust/12 bindgenPaolo Bonzini
The test has a custom .h target that has the same name as the input in the test's source directory. Sometimes a compiler could build a target that intends to use the file in the source tree, but finds an incomplete output of the custom_target, causing the test to fail. To fix this, move the generated headers in a subdirectory of the build tree. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-25coredata: check for per-subproject compiler and linker argumentsPaolo Bonzini
The compiler and linker argument options are special and are only added when the compiler is first discovered. Thus any project-specific values in a child project will remain sitting in pending_options after initialize_from_subproject_call; coredata needs to inform the option store that they now exist. Fixes: #14939 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-25coredata: check for per-subproject compiler optionsPaolo Bonzini
If the parent project has not enabled a language, the child project's project-specific compiler option values are sitting in pending_options after initialize_from_subproject_call, and the option store has to be informed that they now exist. Fixes: #14939 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-19Condense test dirs for rc3.Jussi Pakkanen
2025-08-17ninjabackend: pass objects to doctestsPaolo Bonzini
Fix my misunderstanding of the code before commit aede231ef ("ninjabackend: pass objects to generate_rust_target from non-Rust sources", 2025-07-29). Object files were added by get_rust_compiler_deps_and_args() to both the main target and the doctest command lines: objs, od = self.flatten_object_list(target) for o in objs: args.append(f'-Clink-arg={o}') deps.append(o) therefore they now need to be passed as the final argument of get_rust_compiler_deps_and_args() for both command lines as well. Failure to do so causes problems building doctests when the main target has objects as well. Add a regression test as well. Fixes: #14897 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-17rewriter: accept UnknownValue for name_prefix/name_suffixPaolo Bonzini
Fixes another problem with running "meson configure" on Mesa. Related: #14840 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-11Revert "build: Throw an error instead of warning for sourceless targets"Eli Schwartz
This reverts commit 651aede977179c5fe382744e3dd91ca8e01d050c. This was most certainly not acceptable.
2025-08-11Condense test directory names.Jussi Pakkanen
2025-08-10build: Throw an error instead of warning for sourceless targetsFlorian "sp1rit"​
We might run into an assertion failure down the road, if we don't fail here. Specifically project('proj') executable('bin', 'header.h') will throw during the ninja generation.
2025-08-10build: Ensure that linker requested in link_language is availableFlorian "sp1rit"​
Meson was running into an key lookup failure when evaluating the following: project('proj', 'c') executable('bin', link_language: 'cpp') and since 41eb18d also if the executable contained exclusively header sources.
2025-08-10rewriter: Accept UnknownValue() in more placesVolker Weißmann
Fixes #14840
2025-08-10tests: host_machine instead of meson.host_machine()Volker Weißmann
2025-08-04build: fix introspection interpreter issue when project selects RustPaolo Bonzini
The introspection interpreter sometimes produces targets with no source files; BuildTarget will then pick a random compiler, according to the order in clink_langs. According to the comment in sort_clink, clink_langs are supposed to list languages from *lowest* to highest priority. However, process_compilers_late() process clink_langs in straight order and returns the first language; which is the one with lowest priority. This became visible with the addition of Rust to clink_langs, because Rust has limitation on the names of library targets, but the bug existed before. Fixes: e49f2f7283e1d9f18e2f5f54647c07287cd70339 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-02Add swift_interoperability_mode kwargKatalin Rebhan
2025-08-01cargo: Use -rs suffix only for rust ABIXavier Claessens
A cargo package can build multiple crate types for the same library. Using the same name in meson.override_dependency() fails. [pbonzini: adjust documentation]
2025-08-01wrap: wraps from subprojects can replace directories found with no wrapXavier Claessens
If main project finds a directory subprojects/foo with no corresponding foo.wrap, it creates a dummy PackageDefinition for it. If we later find a subproject that has foo.wrap, replace the dummy wrap with it. This happens for example when wrap-redirect have been deleted. It also happens for subprojects downloaded from some Cargo.lock which does not create a wrap-redirect. Avoid loading the same location twice, which can happen when preparing cargo subprojects.
2025-08-01Condense test directory names for 1.9.Jussi Pakkanen
2025-08-01modules/pkgconfig: Resolve dependencies in case of an internal dependencyCorentin Noël
When giving a dependency object as requires, allow to use the dependency from a subproject (that is an InternalDepdency).
2025-07-29build: allow non-Rust files in non-structured sourcesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29test cases: add test for mixed Rust/C++ executablePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29build: reject invalid link_language for Rust targetsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29test cases: avoid missing_abi warning with recent RustPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29c: add more exceptions to -Wno-*Henrik Lehtonen
Commit eca1ac18dc1978b15b500c9f1710c05cb1ccc0ec (#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’". There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here: * -Wno-alloc-size-larger-than (GCC >=7.1.0) * -Wno-alloca-larger-than (GCC >=7.1.0) * -Wno-frame-larger-than (GCC >=4.4.0) * -Wno-stack-usage (GCC >=4.7.0) Add logic to treat these in the same way. Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
2025-07-25build/process_compilers: Skip throwing error for headersFlorian "sp1rit"​
Dependencies should be able to provide headers in its sources, even tho the target which uses the dependency may not use the language that header is for. A specific example is vala, where C and Vala dependencies share the same name, so in meson they ought to share the same dependency object in order to provide a Vala and/or C dependency depending on who is using it. Doing so right now however fails, if the project of the dependency user doesn't list vala in its used languages, even tho they might just be interested in the C part of the dependency.
2025-07-24Add suffix function to the fs moduleJouke Witteveen
2025-07-24Work around os.path.isabs bug in fs moduleJouke Witteveen
2025-07-24Restructure fs module in terms of os.pathJouke Witteveen
2025-07-24Add -parse-as-library to Swift library targetsKatalin Rebhan
2025-07-21rust: pass rpath arguments to rustdoc --testPaolo Bonzini
rustdoc does not support --print, and therefore the rpath argument corresponding to the rust installation is not passed to doctests. Forward anything that requires --print to the RustCompiler, thus fixing doctests with a shared library dependency. Fixes: #14813 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-19interpreter: Add a flatten() method to arraysDylan Baker
This allows users to do two things, flatten potentially nested arrays themselves, and, to safely convert types that may be an array to not an array. ```meson x = [meson.get_external_property('may_be_array)].flatten() ``` ```meson x = ['a', ['b', 'c']] assert(x.flatten() == ['a', 'b', 'c']) ```
2025-07-18Fix use of a .pxi Cython include file as source from `configure_file`Ralf Gommers
Without adding .pxi` as a known header suffix, the added test will fail with: ``` No specified compiler can handle file stuff.pxi ``` Technically only .pxd are header files, and .pxi are "include files" which are literally included in .pyx files. Adding them as headers seems to be fine though, since they're kinda similar and the point is to avoid treating them as source files.
2025-07-18rust: add rust_dynamic_std optionPaolo Bonzini
As an initial implementation, simply adding "-C prefer-dynamic" works for binary crates (as well as dylib and proc-macro that already used it). In the future this could be extended to other crate types. For more information see the comment in the changed file, as well as https://github.com/mesonbuild/meson/issues/8828 and https://github.com/mesonbuild/meson/issues/14215. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-14environment: really remove assertionPaolo Bonzini
Fixes: #14789 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-14hdf5: Skip failing Fortran config-tool test when h5fc is brokenMichał Górny
Skip the hdf5 Fortran config-tool test when running on CI and h5fc looks broken. This is needed due to upstream bug that h5fc does not include include paths when built via CMake, that currently affects at least Arch Linux and Gentoo. Bug: https://github.com/HDFGroup/hdf5/issues/5660 Signed-off-by: Michał Górny <mgorny@quansight.com>
2025-07-14unittests: add test case for setting and retrieving build optionsPaolo Bonzini
Check that build options fall back to host options, and that they can be retrieved with get_option. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>