summaryrefslogtreecommitdiff
path: root/run_unittests.py
Commit message (Collapse)AuthorAgeFilesLines
* Add unity block size option.Jussi Pakkanen2020-02-121-2/+2
|
* unit tests: Ensure that --profile-self keeps workingNirbheek Chauhan2020-02-121-2/+3
|
* Merge pull request #6573 from michaelbadcrumble/add_sample_templatesJussi Pakkanen2020-02-051-3/+21
|\ | | | | Add new Meson sample templates
| * update test_templates in run_unittests.pyMichael2020-02-021-3/+21
| |
* | pkgconfig: Generate -uninstalled.pc filesXavier Claessens2020-02-051-0/+15
| | | | | | | | Closes: #3472.
* | Fix prefix dependent option defaults (#6552)Jon Turney2020-02-041-1/+7
|/ | | | | | | | | | | | | * Extend test_prefix_dependent_defaults unit test to cover default case Extend test_prefix_dependent_defaults unit test to cover the default case, when the default prefix is '/usr/local'. (On Windows, the default prefix is 'c:/') * Restore adjusting option defaults depending on the default prefix Restore adjusting option defaults, depending on the default prefix. Droppped in d778a371
* summary: Fix empty list caseXavier Claessens2020-02-011-0/+1
| | | | Fixes: #6557.
* Bugfix: sanitize_dir: use pathlib to handle case-insensitive filesystems (#6398)Michael Hirsch, Ph.D2020-01-301-7/+14
|
* Skip ld tests if no compiler installed.Jussi Pakkanen2020-01-291-0/+2
| | | | Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950020
* run_unitests: Add a test for DependencyFactory orderingDylan Baker2020-01-291-0/+21
|
* run_unittests: Add a chdir context managerDylan Baker2020-01-291-18/+24
| | | | Because seriously
* Fix broken link on Elbrus Fortran compilermakise-homura2020-01-271-1/+3
| | | | | | | Error is raised due to Elbrus Fortran compiler can't generate debug information for now, because it's a 2-step compiler where 1st step is code conversion from Fortran to C, so debug information which C compiler would produce, is useless.
* ObjC/ObjC++ compilers are not available for Elbrus, so don't failmakise-homura2020-01-271-1/+1
|
* Support multiple args to message() and warning()Xavier Claessens2020-01-261-0/+8
|
* Fix required dependency() not failing when wrap-mode=nofallbackXavier Claessens2020-01-251-0/+5
| | | | | | When a dependency is required, not found on the system, and its fallback is disabled with --wrap-mode=nofallback, meson should abort instead of returning not-found.
* unit tests: summary() test does not fail on Windows anymoreNirbheek Chauhan2020-01-241-3/+1
|
* summary: Ensure that output is deterministicNirbheek Chauhan2020-01-241-3/+10
| | | | | Use OrderedDict instead of dict() to ensure that the order is the same every time, and change the unit test to check for that.
* unit tests: Open all documentation as utf-8Nirbheek Chauhan2020-01-241-6/+6
| | | | Fixes compatibility of unit tests with Python 3.5.2 on Ubuntu 16.04
* test_pkgconfig_gen_deps: set PKG_CONFIG_SYSTEM_LIBRARY_PATH=/usr/libMike Gilbert2020-01-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | pkgconf automatically prunes "system library paths" from its output. The system library paths depend on the system toolchain. A common value on a 64-bit system is as follows: /lib64:/usr/lib64:/usr/local/lib64 So, if -L/usr/lib64 appears in the Libs section, it will be pruned from the output of pkg-config --libs. The pc files generated for this test contain something like this: libdir=/usr/lib Libs: -L${libdir} ... pkgconf may not consider /usr/lib to be a system library path, so it is not pruned as the test expects. To work around this, override the compiled-in list of paths via the PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variable. Fixes: https://github.com/mesonbuild/meson/issues/6004
* tests: Add a test case for finding ldDylan Baker2020-01-221-2/+2
|
* environment: Replace LD with <LANG>LDDylan Baker2020-01-221-2/+5
| | | | | | | | | | | | | | | | | | | | | The rust code is ugly, because rust is annoying. It doesn't invoke a linker directly (unless that linker is link.exe or lld-link.exe), instead it invokes the C compiler (gcc or clang usually) to do it's linking. Meson doesn't have good abstractions for this, though we probably should because some of the D compilers do the same thing. Either that or we should just call the c compiler directly, like vala does. This changes the public interface for meson, which we don't do unless we absolutely have to. In this case I think we need to do it. A fair number of projects have already been using 'ld' in their cross/native files to get the ld binary and call it directly in custom_targets or generators, and we broke that. While we could hit this problem again names like `c_ld` and `cpp_ld` are far less likely to cause collisions than `ld`. Additionally this gives a way to set the linker on a per-compiler basis, which is probably in itself very useful. Fixes #6442
* envconfig: add pkg_config_libdir propertyStéphane Cerveau2020-01-221-1/+29
| | | | | In order to unify the use of sysroot in the cross-file, the pkg_config_libdir can now be passed directly in the file.
* tests: Add a unit test for checksumsNirbheek Chauhan2020-01-221-0/+28
| | | | Adds a CI dependency on the `pefile` python module.
* wrap: Fix support of file:// URLsXavier Claessens2020-01-171-0/+34
| | | | Fixes: #6445
* find_program: Always use USERPROFILE instead of HOMENirbheek Chauhan2020-01-151-0/+8
| | | | | | | On MSYS2 and MSYS, Python reads HOME instead of USERPROFILE, which gets the path wrong. Serves me right for not writing a test!!
* pkgconfig module: add FeatureNew for requires: dependency('foo')Eli Schwartz2020-01-091-2/+4
| | | | Introduced in https://github.com/mesonbuild/meson/pull/3131
* Rename test dirs to sequential order.Jussi Pakkanen2020-01-081-4/+4
|
* PkgConfigDependency: Sort -L flags according to PKG_CONFIG_PATHTing-Wei Lan2019-12-181-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is more than one path in PKG_CONFIG_PATH. It is almost always preferred to find things in the order specified by PKG_CONFIG_PATH instead of assuming pkg-config returns flags in a meaningful order. For example: /usr/local/lib/libgtk-3.so.0 /usr/local/lib/pkgconfig/gtk+-3.0.pc /usr/local/lib/libcanberra-gtk3.so /usr/local/lib/pkgconfig/libcanberra-gtk3.pc /home/mesonuser/.local/lib/libgtk-3.so.0 /home/mesonuser/.local/lib/pkgconfig/gtk+-3.0.pc PKG_CONFIG_PATH="/home/mesonuser/.local/lib/pkgconfig:/usr/local/lib/pkgconfig" libcanberra-gtk3 is a library which depends on gtk+-3.0. The dependency is mentioned in the .pc file with 'Requires', so flags from gtk+-3.0 are used in both dynamic and static linking. Assume the user wants to compile an application which needs both libcanberra-gtk3 and gtk+-3.0. The application depends on features added in the latest version of gtk+-3.0, which can be found in the home directory of the user but not in /usr/local. When meson asks pkg-config for linker flags of libcanberra-gtk3, pkg-config picks /usr/local/lib/pkgconfig/libcanberra-gtk3.pc and /home/mesonuser/.local/lib/pkgconfig/gtk+-3.0.pc. Since these two libraries come from different prefixes, there will be two -L arguments in the output of pkg-config. If -L/usr/local/lib is put before -L/home/mesonuser/.local/lib, meson will find both libraries in /usr/local/lib instead of picking libgtk-3.so.0 from the home directory. This can result in linking failure such as undefined references error when meson decides to put linker arguments of libcanberra-gtk3 before linker arguments of gtk+-3.0. When both /usr/local/lib/libgtk-3.so.0 and /home/mesonuser/.local/lib/libgtk-3.so.0 are present on the command line, the linker chooses the first one and ignores the second one. If the application needs new symbols that are only available in the second one, the linker will throw an error because of missing symbols. To resolve the issue, we should reorder -L flags according to PKG_CONFIG_PATH ourselves before using it to find the full path of library files. This makes sure that we always follow the preferences of users, without depending on the unreliable part of pkg-config output. Fixes https://github.com/mesonbuild/meson/issues/4271.
* Merge pull request #4649 from dcbaker/summary-functionJussi Pakkanen2019-12-181-0/+34
|\ | | | | Add a summary() function for configuration summarization
| * summary: Add bool_yn keyword argumentXavier Claessens2019-12-121-0/+2
| |
| * summary: Allow section with no title, and passing key/value separatelyXavier Claessens2019-12-121-7/+4
| |
| * Add a summary() function for configuration summarizationXavier Claessens2019-12-121-0/+35
| | | | | | | | | | | | Based on patch from Dylan Baker. Fixes #757
* | mlog: Add a log_once functionDylan Baker2019-12-131-0/+29
| | | | | | | | | | There are a number of cases where we end up spamming users with the same message over and over again, which is really annoying. This solves that.
* | mintro: include test protocol in introspection dataPaolo Bonzini2019-12-131-1/+1
|/
* Merge pull request #6207 from dcbaker/linker-optionJussi Pakkanen2019-12-111-24/+65
|\ | | | | Add a way to select the dynamic linker meson uses
| * run_unittests: Add tests for LD on windowsDylan Baker2019-12-031-0/+23
| |
| * run_unittests: Add unittests for ld overridingDylan Baker2019-12-031-0/+37
| |
| * Intel: Dump worthless Xild abstractionsDylan Baker2019-12-031-2/+2
| | | | | | | | | | | | | | | | | | This dumps xild on mac and linux. After a lot of reading and banging my head I've discovered we (meson) don't care about xild, xild is only useful if your invoke ld directly (not through icc/icpc) and you want to do ipo/lto/wpo. Instead just make icc report what it's actually doing, invoking ld or ld64 (for linux and mac respectively) directly. This allows us to get -fuse-ld working on linux.
| * run_unittests: remove unused PatchModule classDylan Baker2019-12-021-20/+1
| |
| * Allow selecting the dynamic linkerDylan Baker2019-12-021-2/+2
| | | | | | | | | | | | | | This uses the normal meson mechanisms, an LD environment variable or via cross/native files. Fixes: #6057
* | mintro: Add version key to --scan-dependencies (fixes #6287)Daniel Mensinger2019-12-101-1/+6
| |
* | run_unittests: Disable pytest with python <= 3.5Xavier Claessens2019-12-101-0/+2
| | | | | | | | | | It's causing issues in some CI runners, it looks like it could be that bug: https://github.com/pytest-dev/pytest-xdist/issues/204.
* | assert(): Make message argument optionalXavier Claessens2019-12-101-0/+6
| |
* | dist: Add --include-subprojects optionXavier Claessens2019-12-081-2/+37
| |
* | compilers: Rework the CompilerArgs to be less awfulDylan Baker2019-12-051-6/+2
|/ | | | | | | | There are two awful things about CompilerArgs, one is that it directly inherits from list, and there are a lot of subtle gotcahs with inheriting from builtin types. The second is that the class allows arguments to be passed in whatever order. That's bad. This also fully annotates the CompilerArgs class, so mypy can type check it for us.
* Use strict function prototypesMichael Hirsch, Ph.D2019-11-181-2/+2
|
* Merge pull request #6182 from mensinda/depInfoJussi Pakkanen2019-11-171-0/+1
|\ | | | | Better dependency logs
| * mintro: dependencies: added version keyDaniel Mensinger2019-11-141-0/+1
| |
* | coredata: CmdLineFileParser no longer interpolates strings.Paulo Neves2019-11-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if a user tried to pass a command line build option that contained a '%' character the command line parser assumed that there was string interpolation to be done. As there is no sense in such a scenario no code provides any input for the interpolation. This then leads to a failure. In this commit we specifically override the defaults in ConfigParser and set interpolation to None, which disables command line build option interpolation. Fixes #6157
* | Revert "Add `-Wl,-rpath-link` for secondary dependencies"Jussi Pakkanen2019-11-131-39/+0
|/ | | | | | This reverts commit 7b9c348102792030859ed0001a51416506a0a092. Closes #6027.