summaryrefslogtreecommitdiff
path: root/test cases/unit
AgeCommit message (Collapse)Author
2018-05-22configure_file: Add a new action 'copy'Nirbheek Chauhan
This will copy the file to the build directory without trying to read it or substitute values into it. Also do this optimization if the configuration_data() object passed to the `configuration:` kwarg is empty, and print a warning about it. See also: https://github.com/mesonbuild/meson/issues/1542
2018-05-10test setups: Inherit env when using a test setupNirbheek Chauhan
Closes https://github.com/mesonbuild/meson/issues/3525
2018-05-03python module: Move tests to test cases/unitNirbheek Chauhan
The tests are only run via unit tests, so that's where they should be.
2018-05-02pkgconfig: Don't expose internal libraries in .pc filesNirbheek Chauhan
Libraries that have been linked with link_whole: are internal implementation details and should never be exposed to the outside world in either Libs: or Libs.private: Closes https://github.com/mesonbuild/meson/issues/3509
2018-05-02Keep separator spaces in pkg-config declarations. Closes #3479.Jussi Pakkanen
2018-04-27Passing --default-library=both should override project valueXavier Claessens
Looks like this has always been broken, had_argument_for() was checking if we have --default_library instead of --default-library.
2018-04-27Fix --warnlevel being renamed to --warning-level in latest releaseXavier Claessens
2018-04-26Merge pull request #3225 from filbranden/fixperms3Jussi Pakkanen
Introduce install_umask to determine permissions of files in install tree. Default it to 022
2018-04-25Tests: Add some tests for mixing -Dfoo and --fooDylan Baker
These are at least some of the tests that really deserved to be written for 78e37c495326325ae003683411971779291f8324, but I was lazy.
2018-04-21Don't fail on not-required not-found deps in forcefallback modeNirbheek Chauhan
This involves the creation of a new dummy NotFoundDependency.
2018-04-18Add a unit test for install_umask.Filipe Brandenburger
This test copies a src tree using umask of 002, then runs the build and install under umask 027. It ensures that the default install_umask of 022 is still applied to all files and directories in the install tree.
2018-04-15cross: Add compiler cross_args after normal argsNirbheek Chauhan
This way they override all other arguments. This matches the order of link arguments too. Note that this means -I flags will come in afterwards and not override anything else, but this is correct since that's how toolchain paths work normally too -- they are searched last. Closes https://github.com/mesonbuild/meson/issues/3089
2018-04-15Merge pull request #3115 from makise-homura/e2k-lcc-supportJussi Pakkanen
Support lcc compiler for e2k (Elbrus) architecture
2018-04-15ninjabackend: Try to guess library dependencies for linker invocation.Martin Hostettler
The linkers currently do not support ninja compatible output of dependencies used while linking. Try to guess which files will be used while linking in python code and generate conservative dependencies to ensure changes in linked libraries are detected. This generates dependencies on the best match for static and shared linking, but this should not be a problem, except for spurious rebuilding when only one of them changes, which should not be a problem. Also makes sure to ignore any libraries generated inside the build, to keep the optimisation working where changes in a shared library only cause relink if the symbols have changed as well.
2018-04-14Improve generation of pkg-config files for static only libraries.Martin Hostettler
Previously pkg-config files generated by the pkgconfig modules for static libraries with dependencies could only be used in a dependencies with `static: true`. This was caused by the dependencies only appearing in Libs.private even if they are needed in the default linking mode. But a user of a dependency should not have to know if the default linking mode is static or dynamic; A dependency('somelib') call should always pull in all needed pieces into the build. Now for meson build static libraries passed via `libraries` to the generate method automatically promote dependencies to public.
2018-04-07[fixup]: rename test after rebaseMathieu Duponchelle
2018-04-07[fixup]: export symbols explicitlyMathieu Duponchelle
2018-04-06[fixup]: Add testMathieu Duponchelle
2018-03-29Fixing flake8chitranjali
2018-03-29PR review changes closes #2865chitranjali
2018-03-29fix2865chitranjali
2018-03-23Enable b_ndebug on VisualStudioCCompilerAleksey Filippov
2018-03-21Disable b_ndebug tests on MSVCAleksey Filippov
2018-03-21Add unittests for b_ndebug=if-release and buildtype interactionsAleksey Filippov
2018-03-21test_reconfigure switched to b_coverage from b_ltomakise-homura
This is due to some compilers (e.g. lcc) don't support LTO, and therefore no b_lto meson option is available.
2018-03-19Merge pull request #3251 from mesonbuild/fixpkgconfigdepsJussi Pakkanen
Fix pkg-config dependencies leaking out (debbug 892956)
2018-03-16Add test for pkgconfig generation and usage.Jussi Pakkanen
This builds a project with pkg-config file, installs it and then builds a second project that uses that dependency and runs the result.
2018-03-13Merge pull request #3127 from bluetech/method-permitted-kwargsJussi Pakkanen
2018-03-06Allow passing a compiler object to run_command()Evgenii Shatokhin
Sometimes it is needed to run the current compiler with specific options not to compile a file but rather to obtain additional info. For example, GCC has several -print-* options to query it about the paths to different libraries and development files. One use case is to get the location of development files for GCC plugins, which is not easily obtainable by other means: gcc -print-file-name=plugin For this purpose, it would be convenient if the compiler object returned by meson.get_compiler(lang) could be used in run_command() directly. This commit implements it. Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2018-02-25Add some test setup selection tests.Hemmo Nieminen
2018-02-23Warn if non-permitted keyword arguments are given to compiler methodsRan Benita
This can help future generations avoid mistakes like this: https://github.com/xkbcommon/libxkbcommon/commit/edb1c662394578a54b7bbed231d918925e5d8150 To avoid breaking builds, this is currently just an error. After sufficient time has passed this can hopefully become a hard error, similarly to the already-existing `permittedKwargs` warnings.
2018-02-20pkgconfig deps: Warn when a static library isn't foundNirbheek Chauhan
A hard error makes this feature useless in most cases since a static library usually won't be found for every library, particularly system libraries like -lm. Instead, warn so the user can provide the static library if they wish. This feature will be expanded and made more extensible and more usable in the future. Closes https://github.com/mesonbuild/meson/issues/2785
2018-02-18Merge pull request #2863 from jon-turney/exit-status-on-exceptionJussi Pakkanen
Verify that failing tests are failing with an error, not a python exception
2018-02-16Fix subproject prefix handling when checking subproject option validity.Hemmo Nieminen
2018-02-15Add a test case for python exception exit statusJon Turney
2018-01-19Add external dependencies to pc files only if found. Closes #2911.Jussi Pakkanen
2018-01-19Renamed test dir to avoid duplicated numbers.Jussi Pakkanen
2018-01-03Merge pull request #2856 from jon-turney/warning-locationJussi Pakkanen
Consolidate warning location formatting
2018-01-02Merge pull request #2838 from ↵Jussi Pakkanen
mesonbuild/nirbheek/consolidate-subproject-dep-checking intrp: Consolidate subproject dep checking and logging
2018-01-01Use location formatting in mlog.warning() for invalid kwarg warningJon Turney
This already reports the location (in a slightly different format), but using mlog.warning() will make it easier if we want to change the location format in future.
2018-01-01Wire up locations in a couple more warningsJon Turney
These are the remaining warnings in the parser, where we have the location to hand.
2018-01-01intrp: Consolidate subproject dep checking and loggingNirbheek Chauhan
If a dep is not found on the system and a fallback is specified, we have two cases: 1. Look for the dependency in a pre-initialized subproject 2. Initialize the subproject and look for the dependency Both these require version comparing, ensuring the fetched variable is a dependency, and printing a success message, erroring out, etc. Now we share the relevant code instead of duplicating it. It already diverged, so this is a good thing. As a side-effect, we now log fallback dependencies in the same format as system dependencies: Dependency libva found: YES Dependency libva found: YES (cached) Dependency glib-2.0 from subproject subprojects/glib found: YES Dependency glib-2.0 from subproject subprojects/glib found: YES (cached)
2017-12-30Append warning location to warning output by warning()Jon Turney
2017-12-30Add a test case for location in duplicate kwarg warningJon Turney
2017-12-26Merge pull request #2334 from mesonbuild/promotedepJussi Pakkanen
Add functionality to promote nested dependencies to top level.
2017-12-26unit tests: Test that relative install_rpath works correctlyNirbheek Chauhan
We weren't testing this with C++, so the breakage was missed. https://github.com/mesonbuild/meson/issues/2814
2017-12-19Warn on unknown command line argumentsDylan Baker
I have a tendency to typo things. Humans in general are bad at spotting spelling mistakes, computers are not. This patches prints the bad options and provides the generic meson "This will be a hard error someday" message.
2017-12-17Also promote wrap files.Jussi Pakkanen
2017-12-17Add functionality to promote nested dependencies to top level.Jussi Pakkanen
2017-12-03dependencies: Convert /c/foo/bar paths to C:/foo/barNirbheek Chauhan
MSVC cannot handle MinGW-esque /c/foo paths, convert them to C:/foo. We cannot resolve other paths starting with / like /home/foo so leave them as-is so the user gets an error/warning from the compiler/linker. These paths are commonly found in pkg-config files generated using Autotools inside MinGW/MSYS and MinGW/MSYS2 environments. Currently this is only done for PkgConfigDependency.