aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2022-03-28Condense test directory names.dircondense64Jussi Pakkanen569-86/+86
2022-03-24Make compilers list per subprojectXavier Claessens8-4/+19
Previously subprojects inherited languages already added by main project, or any previous subproject. This change to have a list of compilers per interpreters, which means that if a subproject does not add 'c' language it won't be able to compile .c files any more, even if main project added the 'c' language. This delays processing list of compilers until the interpreter adds the BuildTarget into its list of targets. That way the interpreter can add missing languages instead of duplicating that logic into BuildTarget for the cython case.
2022-03-23Add support for cython_argsTristan Partin3-0/+38
cython_args was previoously ignored by Meson.
2022-03-23add test d/14 dub with depsRemi Thebault2-0/+93
2022-03-22interpreter: Make compiler options per-subprojectXavier Claessens5-6/+32
2022-03-22tests/common/44: Prepend to PKG_CONFIG_PATh instead of replacing itDylan Baker2-4/+10
Which is required to make this test work when PKG_CONFIG_PATH is required to get a working system, such as on nixos
2022-03-22Add ability to add resources to jarsTristan Partin5-0/+48
Previously Meson lacked the ability to add resources to jar files. Fixes #9945
2022-03-21Merge pull request #10147 from dcbaker/submit/structured-sources-subdirJussi Pakkanen10-0/+31
structured_sources: fix subdir handling
2022-03-21tests/rust: renumber structred sources testDylan Baker10-0/+0
2022-03-21ninja: fix handling of rust structured_sources in rare caseDylan Baker4-0/+31
In the even that all of the inputs are generated, and they're all generated into the same folder, and there are no subfolders, we would fail to correctly handle all of the files after the main file. Let's fix that.t
2022-03-18tests: make python2 dependency on 32-bit windows non-fatalEli Schwartz1-6/+18
Apparently Azure provides 64-bit python2 when we try to test 32-bit, and that breaks everything on the 32-bit test runner. I don't understand the environment setup, and that runner is disappearing soon anyway. Hopefully this shuts up the known breakage.
2022-03-17tests: don't skip python version tests if python is found but its dep is brokenEli Schwartz1-10/+6
If a version of python is installed for testing against, we should assume it's actually important to test against it.
2022-03-16unittests: convert python tests to project testsEli Schwartz6-0/+13
Perhaps when this test case was originally created, project tests could not use a matrix of options? This is certainly possible today, so don't write special unittest handling for this instead. This adds proper visibility into what gets run and what doesn't. Now we know which python executables got tested and which got skipped.
2022-03-15Revert "devenv: Set PYTHONPATH where we install python modules"Eli Schwartz5-36/+1
This reverts commit 79c6075b560dbf1c3e4e0b30f1c472dc2086421e. # Conflicts: # docs/markdown/snippets/devenv.md # mesonbuild/modules/python.py # test cases/unit/91 devenv/test-devenv.py PYTHONPATH cannot be reliably determined. The standard use case for installing python modules with Meson is mixed pure sources (at least `__init__.py`) and compiled extension_modules or configured files. Unfortunately that doesn't actually work because python will not load the same package hierarchy from two different directories, one a source directory and one a (mandatory) out of tree build directory. (It kind of can, but you need to do what this test case accidentally stumbled upon, which is namespace packages. Namespace packages are a very specific use case and you are NOT SUPPOSED to use them outside that use case, so people are not going to use them just to circumvent Meson devenv stuff as that would have negative install-time effects.) Adding PYTHONPATH anyway will just lead to documentation commitments which we cannot actually uphold, and confusing issues at time of use because some imports *will* work... and some will *not*. The end result will be a half-created tree of modules which just doesn't work together at all, but because it partially works, users attempting to debug it will spend time wondering why parts of it do import. For any case where the automatic devenv would work correctly, it will also work correctly to use `meson.add_devenv()` a single time, which is very easy to manually get correct and doesn't provide any significant value to automate. In the long run, an uninstalled python package environment will require "editable installs" support.
2022-03-14sourceset: reinstate extra_depsPaolo Bonzini1-2/+2
Dependencies in the "if_true" keyword argument do not prevent the sources from being used; in other words, they work just like dependencies with "disabler: false". However, this was broken in commit ab0ffc6a2 ("modules/sourceset: Fix remaining typing issues", 2022-02-23) which changed logic instead of just fixing typing issues. This was likely an attempt to avoid using "dependencies.Dependency" after the "dependencies" field was declared, but it also broke QEMU. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-13Merge pull request #9339 from dcbaker/submit/structured_sourcesJussi Pakkanen13-0/+139
Structured Sources
2022-03-12fix regression in vcs_tag when the VCS program is not installedEli Schwartz1-0/+6
We are supposed to fallback on the fallback when running the vcstagger, but instead we errored out during configure. Fixes regression in commit b402817fb6f0392812bfa272bdbc05c9c30139fa. Before this, we used shutil.which || relative paths, and in the latter case if it could not be found we still wrote out that path but it failed to run in vcstagger. Now, we use find_program under the hood, so it needs to be run in non-fatal mode, and if it is not found, we simply keep the original command string. It's a VCS command, so if we magically end up finding it at runtime because it was installed after running configure, that is *fine*.
2022-03-09Move dataonly pkgconfig file to datadir/pkgconfigTristan Partin1-2/+2
dataonly files are architecture independent (lib vs lib64 for example). Fixes #9902
2022-03-09install: Add --strip optionXavier Claessens2-0/+4
2022-03-08tests: bitcode: add missing b_bitcode optionMarvin Scholz1-1/+2
The bitcode test did not actually have bitcode enabled, making it not really useful.
2022-03-07Fix @typed_pos_args on java.generate_native_headersTristan Partin5-17/+33
2022-03-07Add support for rust proc-macro cratesDylan Baker4-1/+35
2022-03-07tests/rust: Add a test for structured inputsDylan Baker13-0/+139
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>