aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2020-10-17Fix gnome.compile_resources() when glib is a subprojectXavier Claessens1-1/+1
When glib is a subproject we should use glib-compile-resources it overrides using find_program() in the case it is not installed on the build machine. With old glib version we have to run glib-compile-resources at configure time to generate the list of dependencies, but not when glib is recent enough.
2020-10-16Add test case for "subproject:opt" in project()Xavier Claessens3-0/+7
This is regression test for #7573
2020-10-16Add CUDA compiler header symbol testsCarlos Bederian1-0/+27
2020-10-16Fix consistency in variables kwargXavier Claessens5-4/+8
Share common code to extract the `variables` kwarg in declare_dependency() and pkg.generate().
2020-10-15intro: Add extra_files key to intro output (fixes #7310)Daniel Mensinger3-3/+12
2020-10-13wrap: Use sub-subproject packagefilesXavier Claessens1-0/+0
2020-10-13Merge wraps from subprojects into wraps from main projectXavier Claessens5-1/+19
wraps from subprojects are now merged into the list of wraps from main project, so they can be used to download dependencies of dependencies instead of having to promote wraps manually. If multiple projects provides the same wrap file, the first one to be configured wins. This also fix usage of sub-subproject that don't have wrap files. We can now configure B when its source tree is at `subprojects/A/subprojects/B/`. This has the implication that we cannot assume that subproject "foo" is at `self.subproject_dir / 'foo'` any more.
2020-10-13include_type: Add CMake subporject dependency method (fixes #6879)Daniel Mensinger1-1/+2
2020-10-13include_type: honor include_type in dependency fallbacks (fixes #7503)Daniel Mensinger1-0/+3
2020-10-13cmake: Add cross testsDaniel Mensinger14-7/+35
2020-10-12Merge pull request #7740 from bonzini/fallback-falseJussi Pakkanen6-0/+28
Allow blocking/forcing automatic subproject search
2020-10-10add test case for #6365Sahnvour5-0/+35
2020-10-08dependency: support boolean argument "allow_fallback"Paolo Bonzini6-0/+28
Sometimes, distros want to configure a project so that it does not use any bundled library. In this case, meson.build might want to do something like this, where slirp is a combo option with values auto/system/internal: slirp = dependency('', required: false) if get_option('slirp') != 'internal' slirp = dependency('slirp', required: get_option('slirp') == 'system') endif if not slirp.found() slirp = subproject('libslirp', ...) .variable('...') endif and we cannot use "fallback" because the "system" value should never look for a subproject. This worked until 0.54.x, but in 0.55.x this breaks because of the automatic subproject search. Note that the desired effect here is backwards compared to the policy of doing an automatic search on "required: true"; we only want to do the search if "required" is false! It would be possible to look for the dependency with `required: false` and issue the error manually, but it's ugly and it may produce an error message that looks "different" from Meson's. Instead, with this change it is possible to achieve this effect in an even simpler way: slirp = dependency('slirp', required: get_option('slirp') != 'auto', allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep']) The patch also adds support for "allow_fallback: true", which is simple and enables automatic fallback to a wrap even for non-required dependencies.
2020-10-07Tests: py.dependency() now has required:true by defaultXavier Claessens1-1/+1
It used to ignore the required argument and got fixed to be consistent with dependency() function.
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen1-3/+8
2020-10-05options: Handle updates to choices in optionsDylan Baker3-0/+27
Currently if you change the `choices` field in the meson_options.txt file, no update will be done until `meson setup --wipe` is called. Now if the choices change then the options will be properly merged. If the currently select value is still valid it is guaranteed to be kept, if it is now invalid the new default value will be used and a warning will be printed. Fixes #7386
2020-10-05Never run clang-format / clang-tidy against directoriesBernd Busse2-0/+2
`pathlib.Path.glob()` also returns directories that match source filenames (i.e. a directory named `test.h/`), but `clang-format` and `clang-tidy` fail when handed a directory. We manually skip calling `clang-format` and `clang-tidy` on those directories.
2020-10-05machinefiles: Allow keys to be stored case insensitiveDylan Baker2-0/+10
This is required to make the various keys in the [user options] section work the same as they do in the meson_options.txt file, where we don't have any rules about case sensitivity. There is some risk here. Someone may be relying on this lower by default behavior, and this could break their machine files. Fixes #7731
2020-10-04Added subdir files testOskar Sigvardsson3-0/+5
2020-10-04cmake: switch to pathlib (fixes #7322)Daniel Mensinger2-4/+2
2020-09-29tests/curses: Extend to test versionsDylan Baker1-1/+5
This is mostly important for the system dependency where we need to roll the version check ourselves.
2020-09-29dependencies/curses: Add a system dependencyDylan Baker2-2/+3
That calls find_library and has_header in conjunction to look for curses implementations that are baked into the system without any other find method.
2020-09-29dependencies/curses: Add support for using the ncurses config toolsDylan Baker3-1/+17
These are mostly duplicated with pkg-config, but maybe someone has one but not another, and they're easy to turn on with the ConfigToolDependency.
2020-09-29Merge pull request #7758 from dcbaker/submit/hdf5-factoryDylan Baker3-7/+40
dependencies/hdf5: Convert to a dependency_factory
2020-09-29Merge pull request #7762 from jon-turney/meson-exe-output-improveJussi Pakkanen1-0/+7
Improve the output for meson wrapped commands
2020-09-29Merge pull request #7772 from xclaesse/deprecate-source-rootJussi Pakkanen4-2/+11
Deprecate meson.build_root() and meson.source_root()
2020-09-28Add meson.project_build/source_root() methodsXavier Claessens4-2/+11
2020-09-27Fixes meson test timeout on windowsYonggang Luo1-2/+2
``` 2020-09-23T01:25:14.7849070Z 2020-09-23T01:25:14.7849592Z 1/5 Boost linktest TIMEOUT 30.16s 2020-09-23T01:25:14.7849811Z 2020-09-23T01:25:14.7850027Z --- command --- 2020-09-23T01:25:14.7850281Z 01:24:30 D:\a\1\s\b 125f976e40\linkedexe.exe 2020-09-23T01:25:14.7850561Z ------- 2020-09-23T01:25:14.7850693Z 2020-09-23T01:25:14.7850947Z 2/5 Boost UTF test TIMEOUT 31.15s 2020-09-23T01:25:14.7851141Z 2020-09-23T01:25:14.7851347Z --- command --- 2020-09-23T01:25:14.7851580Z 01:24:30 D:\a\1\s\b 125f976e40\utf.exe 2020-09-23T01:25:14.7851862Z --- stdout --- 2020-09-23T01:25:14.7852065Z Running 1 test case... 2020-09-23T01:25:14.7852441Z ``` Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
2020-09-25tests/hdf5: work around some problemsDylan Baker1-5/+20
There are two cases that won't work (these are taken from fortran/9 cpp), using gfortran with a non-gcc compiler on windows, or using gfortran with apple clang. The latter is due to default search paths, which we can fix, but is out of scope for this MR.
2020-09-25dependencies/hdf5: Convert to a dependency_factoryDylan Baker3-3/+21
Instead of a mega dependency that does everything, use a dependency factory for config-tool and pkg-config
2020-09-21Add a test of a failed pickled commandJon Turney1-0/+7
2020-09-17project tests: Verify that UWP cross binaries use the right archNirbheek Chauhan2-0/+38
This is a test for https://github.com/mesonbuild/meson/pull/7021, to verify that `link.exe` uses the correct architecture when targeting ARM64. Can be extended to other cross targets later.
2020-09-14InternalDependency: Add as_link_whole() methodXavier Claessens3-0/+23
2020-09-13external-project: New module to build configure/make projectsXavier Claessens9-0/+126
This adds an experimental meson module to build projects with other build systems. Closes: #4316
2020-09-11Fix test 'common/122 llvm ir and assembly' for Windows ARMJon Turney3-10/+59
2020-09-11Skip test 'common/121 shared modules' on Windows UWPJon Turney1-1/+19
2020-09-10Split tests out from 'common' which require a native compilerJon Turney53-31/+127
Split out tests (and parts of tests) which require a native compiler from the 'common' suite to a new suite called 'native', so we can selectively avoid running those tests when only a cross-compiler is available. Also move test '211 cmake module' to 'cmake' suite, since it appears that the way we use cmake requires a native compiler.
2020-09-10Identify machine in error accesing compiler object for missing languageJon Turney2-0/+9
Also add a failing test case for that error.
2020-09-10cmake: fix shared_module dependency (fixes #7715)Daniel Mensinger6-0/+246
2020-09-09Merge pull request #7428 from jon-turney/introspector-add-languagesJussi Pakkanen1-0/+2
Handle add_languages(native:) in introspector
2020-09-09Add a test of add_languages(native:) introspectionJon Turney1-0/+2
If the meson.build doesn't use a native compiler, the native compiler options (e.g. 'c_args') shouldn't be present in the output of 'meson introspect --buildoptions'.
2020-09-08IntrospectInterpreter: allow dictionaries with nonconstant keysPaolo Bonzini1-0/+1
Something like {a: foo} currently stymies the IntrospectionInterpreter and breaks introspection of the source directory. The fix is just to walk the keys and return a dummy dictionary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-06Merge pull request #7689 from scivision/fortran_incJussi Pakkanen7-26/+30
correct Fortran include algorithm
2020-09-04introspect: add test dependencies info to test/benchmark JSONPaolo Bonzini2-2/+10
Add the ids of any target that needs to be rebuilt before running the tests as computed by the backend, to the introspection data for tests and benchmarks. This also includes anything that appears on the test's command line. Without this information, IDEs must update the entire build before running any test. They can now instead selectively build the test executable itself and anything that is needed to run it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-03tests: add fortran cmake subproject include testMichael Hirsch7-26/+30
ci:unused_arg: update ninja version to work with fortran+cmake
2020-09-02cuda: bump CUDA version since 3.0 is no longer supportedDaniel Mensinger1-2/+2
2020-09-02Special case meson.version().version_compare() statementXavier Claessens1-0/+17
when that statement gets evaluated, the interpreter remembers the version target and if it was part of the evaluation of a `if` condition then the target meson version is temporally overriden within that if-block. Fixes: #7590
2020-09-02Add test case for cuda compiler setting fixMatt Madison3-0/+40
Signed-off-by: Matt Madison <matt@madison.systems>
2020-08-30CMake module: Allow paths of generated CMake sources for include directoriesSebastian Würl3-2/+13
2020-08-30Be stricter when detecting Windows/CygwinChristoph Reiter1-1/+1
This removes the check for "mingw" for platform.system(). The only case I know where "mingw" is return is if using a msys Python under a msys2 mingw environment. This combination is not really supported by meson and will result in weird errors, so remove the check. The second change is checking sys.platform for cygwin instead of platform.system(). The former is document to return "cygwin", while the latter is not and just returns uname(). While under Cygwin it uname() always starts with "cygwin" it's not hardcoded in MSYS2 and starts with the environment name. Using sys.platform is safer here. Fixes #7552