aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
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-10cython: add unittest to verify that depfiles workEli Schwartz3-0/+8
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-02-07test cases/vala: Fix clang error during int to pointer coercionNirbheek Chauhan2-3/+3
``` clang [...] -c valaprog.p/GLib.Thread.c ../test cases/vala/5 target glib/GLib.Thread.vala:17:17: error: incompatible integer to pointer conversion passing 'gint' (aka 'int') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion] g_thread_exit (get_ret_code ()); ^~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:158:66: note: passing argument to parameter 'retval' here void g_thread_exit (gpointer retval); ^ 1 error generated. ```
2023-02-01add cc.has_function_attribute('vector_size')Dudemanguy1-0/+1
2023-01-31log running commands a bit better by doing proper shell quotingEli Schwartz1-1/+1
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>
2023-01-25tests: avoid unexpected failure when cmake is not installedEli Schwartz1-1/+2
This test case checks stdout and demands a `dependency()` lookup fail. The resulting error message can be different depending on whether cmake is installed, or not. For cmake-specific tests we would simply skip the test if cmake is not installed, but here we can just fine-tune the pattern matching we use to determine if the test failed "correctly". Fixes #11320
2023-01-20Deprecate passing strings to non-string optionsDylan Baker4-2/+16
Currently Meson allow the following (Muon does not): ```meson option('foo', type : 'boolean', value : 'true') option('bar', type : 'integer', value : '42') ``` This is possibly a holdover from very old code, but it's a bad idea and we should stop doing it. This deprecation is the first stop on that journey.
2023-01-20use typed_kwargs for the various option subparsersDylan Baker1-1/+1
We make use of allow_unknown=True here, which allows us to only look at the common arguments in the main option parser, and then look at the specific options in the dispatched parsers. This allows us to do more specific checking on a per overload basis.
2023-01-18devenv: Allow dumping into file and select a formatXavier Claessens2-0/+6
It is often more useful to generate shell script than dumping to stdout. It is also important to be able to select the shell format. Formats currently implemented: - sh: Basic VAR=prepend_value:$VAR - export: Same as 'sh', but also export VAR - vscode: Same as 'sh', but without substitutions because they don't seems to work. To be used in launch.json's envFile.
2023-01-18 Fix nasm when target has threads as added dependencyGijs Peskens1-0/+12
2023-01-15BUG: Fix generated sources not being included as dependencies in cython ↵Thomas Li3-0/+23
transpilation
2023-01-10backends: Stop passing generator exes to ExecutableSerialisation as stringsDylan Baker7-0/+81
The code below this already handles being passed an Executable or ExternalProgram, and it does it correctly, since it handles host binaries that need an exe_wrapper correctly, while the code in the generator paths doesn't. The xcode backend is, like always, problematic, it doesn't handle things the same way as the ninja and vscode backends, and generates a shell script instead of using meson as a wrapper when needed (it seems likely that just forcing the meson path for xcode would be better). I don't have a working mac to develop a fix for, so I've left a todo comment there. Fixes: #11264
2023-01-04add testcase for declare_dependency(objects: ...)Paolo Bonzini4-0/+30
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-01-04allow passing generated objects in the "objects" keyword argumentPaolo Bonzini1-0/+6
Generated objects can already be passed in the "objects" keyword argument as long as you go through an extract_objects() indirection. Allow the same even directly, since that is more intuitive than having to add them to "sources". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-12-27add license_files kwarg to projectEli Schwartz6-3/+10
Hook this up to installed dependency manifests. This is often needed above and beyond just an SPDX string -- e.g. many licenses have custom copyright lines.
2022-12-27tests: fix test that has source code incompatible with modern CEli Schwartz2-1/+12
Delayed until clang 16, -Werror=incompatible-function-pointer-types is the default. GCC 14 is "likely to do the same". See https://wiki.gentoo.org/wiki/Modern_C_porting
2022-12-21add more testcases for prebuilt objectsPaolo Bonzini2-3/+23
Cover more cases including passing objects via ExtractedObjects and CustomTarget.
2022-12-16Merge pull request #11174 from bgilbert/jar-manifestJussi Pakkanen2-0/+21
depfixer: silence `fix_jar()` and make it do something
2022-12-15Try to find the jni dependency when javac is a Darwin stubTristan Partin1-0/+6
Darwin-based systems, at least macOS, provide various JDK executable stubs in /System/Library/Frameworks/JavaVM.framework/Versions/*/Commands. These stubs are placed in such a way that they break the heuristics of the JNI system dependency. If a javac being analyzed to find a Java home is a stub, use /usr/libexec/java_home. See https://stackoverflow.com/a/15133344/7572728 for more details. Closes #11173
2022-12-14depfixer: silence fix_jar() and make it do somethingBenjamin Gilbert2-0/+21
fix_jar() tries to remove an existing Class-Path entry from the jar manifest by postprocessing the manifest and passing it to `jar -um`. However, `jar -um` can only add/replace manifest entries, not remove them, and it also complains loudly when replacing an entry: Dec 13, 2022 7:11:19 PM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Manifest-Version. Ensure that the manifest does not have duplicate entries, and that blank lines separate individual sections in both your manifest and in the META-INF/MANIFEST.MF entry in the jar file. Thus fix_jar() produces one such warning for each entry in the manifest and accomplishes nothing else. Use jar -uM instead. This completely removes the manifest from the jar and allows adding it back as a normal zip member, fixing fix_jar() and avoiding the warnings. Fixes: https://github.com/mesonbuild/meson/issues/10491 Fixes: c70a051e93 ("java: remove manifest classpath from installed jar")
2022-12-11fix broken fs.copyfile function that crashed if you tried to use itEli Schwartz2-2/+7
At least, if you tried to use it when passing an install_dir. Because T.Sequence is horrible and we should never use it, and the annotations are a lie that produces bugs. So, fix the annotations on CustomTarget to never allow this to happen again, and also fix the function too. Move some definitions elsewhere inline to satisfy the linter. Fixes #11157
2022-12-11Rename java.generate_native_headers to java.native_headersTristan Partin1-1/+1
This follows the Meson naming scheme which typically leaves off a verb like generate.
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-12-11Merge pull request #11024 from dcbaker/submit/bindgen-dependenciesJussi Pakkanen6-1/+80
Add a `dependencies` keyword argument to bindgen
2022-12-06test: Add get_define test with prefix arrayMarvin Scholz1-0/+7
2022-12-05when generating optional utility targets in ninja, skip existing aliases tooEli Schwartz3-2/+8
When auto-generating e.g. a `clang-format` target, we first check to see if the user has already defined one, and if so we don't bother creating our own. We check for two things: - if a ninja target already exists, skip - if a run_target was defined, skip The second check is *obviously* a duplicate of the first check. But the first check never actually worked, because all_outputs was only generated *after* generating all utility rules and actually writing out the build.ninja file. The check itself compares against nothing, and always evaluates to false no matter what. Fix this by reordering the target creation logic so we track outputs immediately, but only error about them later. Now, we no longer need to special-case run_target at all, so we can drop that whole logic from build.py and interpreter.py, and simplify the tracked state. Fixes defining an `alias_target()` for a utility, which tried to auto-generate another rule and errored out. Also fixes doing the same thing with a `custom_target()` although I cannot imagine why anyone would want to produce an output file named `clang-format` (unless clang itself decided to migrate to Meson, which would be cool but feels unlikely).
2022-12-05modules/rust: Add support for dependencies in bindgenDylan Baker6-1/+80
This is needed for cases where we need external C headers, which are passed to clang.
2022-12-05modules/rust: Add support for string include_directoriesDylan Baker2-2/+9
Which we support for basically every other case, but not this one.
2022-11-24Fix various spelling errorsDavid Robillard3-4/+4
Found with codespell.
2022-11-21Handle freezing tests. Fixes #10752.Jussi Pakkanen2-0/+25
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-11-14tests: fix edge case where non-default python is used, by skipping itEli Schwartz2-5/+18
In a couple of python module tests, we try to test things that rely on the default python being the same one we look up in the python module. This is unsolvable for the deprecated python3 module, as it actually uses the in-process version of python for everything. For the python module, we could actually look up the default system python instead of the one we are running with, but then we wouldn't be testing the functionality of that alternative python... and also the install manifest tests would see files installed for the wrong version of python, and report a combination of missing+extra files... Solve both tests by just skipping the parts we cannot check.
2022-11-06Implement `in` operator on stringXavier Claessens1-0/+3
2022-11-02backends: Try guessing install tag for all installed filesXavier Claessens1-0/+16
It was only trying to guess install tag, and log missing tags, for files installed by install_data(). Do it also for all other files, especially custom_taget() that commonly installs generated headers.
2022-11-01Add regression test for pch link_whole bug.Jussi Pakkanen7-0/+39
2022-11-01minstall: make do_strip run with -Sx for macOS targetsL. E. Segovia1-1/+3
This commit also adds some extra symbol noise to lib.c, in order to aid detection of the debug information with nm. Fixes #10943
2022-10-31Revert "tests: Test extern'd globals on MacOS with the Apple Archiver"Eli Schwartz5-31/+0
This reverts commit d285be763f193606b078f218fdedc58679dfe037. This is part of #10628 and needs to be reverted, as it breaks other things. See https://github.com/mesonbuild/meson/pull/10628#issuecomment-1230560772
2022-10-31both_libraries: Make sure to select the right linker for static libXavier Claessens3-1/+33
Regression test: libccpp has both C and C++ sources. The executable only has C sources. It should still link using the C++ compiler. When using both_libraries the static has no sources and thus no compilers, resulting in the executable linking using the C compiler. https://github.com/Netflix/vmaf/issues/1107
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-10-25tests: Add nasm compiler checksXavier Claessens1-0/+18
2022-10-25nasm: Use an hello world test that works on 32bits tooXavier Claessens2-15/+29
Fixes: #10956
2022-10-25Condense test directory numbers.Jussi Pakkanen108-4/+4
2022-10-24Add MASM compilerXavier Claessens2-0/+47
ml and armasm are Microsoft's Macro Assembler, part of MSVC.
2022-10-24Accept disablers in summary valuesElliott Sales de Andrade1-2/+3
They are commonly used as a replacement for a `dependency`, and not accepting them in `summary` breaks the last example in [1] when used as a value. [1] https://mesonbuild.com/Disabler.html#disabling-parts-of-the-build
2022-10-24nasm: Harcode default path on WindowsXavier Claessens1-8/+5
NASM's installer does not add itself into PATH, even when installed by choco.
2022-10-24Add yasm as fallback for nasm languageXavier Claessens1-1/+2