aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2021-02-09backends: Fix custom_target() with configure_file() exeXavier Claessens1-1/+4
2021-02-09Condense test directory names in preparation for rc1.Jussi Pakkanen21-0/+0
2021-02-08Fix exe wrapper detection for run targets.Jussi Pakkanen1-2/+7
2021-02-07Add Qt6 moduleLuca Weiss1-1/+4
2021-02-07Merge pull request #8162 from dcbaker/wip/2021-01/rust-module-bindgenJussi Pakkanen8-0/+191
Add a wrapper to the rust module for bindgen
2021-02-07Make installing non-existing subdirs a supported featurePeter Hutterer2-1/+5
install_subdir() with a non-existing subdir creates the directory in the target directory. This seems like an implementation detail but is quite useful to create new directories for e.g. configuration or plugins in the installed locations. git bisect says this started with 8fe816101467e66792251b4f57e0ddddb537764a. Let's add a test for it and document it to make this behavior official. Limitation: it can only create at the install_dir location, trying to create nested subdirectories does not work and indeed creates the wrong directory structure. That is a bug that should be fixed separately: install_subdir('blah', install_dir: get_option('prefix')) install_subdir('sub/foobar', install_dir: get_option('prefix')) install_subdir('foo/baz', install_dir: get_option('prefix')) $ tree ../_inst ../_inst ├── baz ├── blah └── foobar Fixes #2904
2021-02-07Merge pull request #8288 from bonzini/test-setup-exclude-suitesJussi Pakkanen1-1/+2
introduce add_test_setup(exclude suites: ...) keyword argument
2021-02-07Merge pull request #8305 from xclaesse/run-target-envJussi Pakkanen2-0/+15
run_target: Add env kwarg
2021-02-06rust: Add a module wrapper for bindgenDylan Baker8-0/+191
This has a couple of advantages over rolling it by hand: 1. it correctly handles include_directories objects, which is always handy 2. it correctly generates a depfile for you, which makes it more reliable 3. it requires less typing
2021-02-05tests/cmake: disable some tests that don't work correctly when cross compilingDylan Baker3-0/+12
2021-02-05run_target: Add env kwargXavier Claessens2-0/+15
Re-implement it in backend using the same code path as for custom_target(). This for example handle setting PATH on Windows when command is an executable.
2021-02-04Introduce `fs.read` to read a file as a stringLuke Drummond5-0/+26
Following #7890, this patch introduces the ability to read the contents of a file to the fs module. This patch introduces the ability to read files at configure time, but has some restrictions: - binary files are not supported (I don't think this will prove a problem, and if people are wanting to do something with binary files, they should probably be shelling out to their own script). - Only files outside the build directory allowed. This limitation should prevent build loops. Given that reading an arbitrary file at configure time can affect the configuration in almost arbitrary ways, meson should force a reconfigure when the given file changes. This is non-configurable, but this can easily be changed with a future keyword argument.
2021-02-02interpreter, mtest: introduce add_test_setup(exclude_suites: ...)Paolo Bonzini1-1/+2
This new keyword argument makes it possible to run specific test setups only on a subset of the tests. For example, to mark some tests as slow and avoid running them by default: add_test_setup('quick', exclude_suites: ['slow'], is_default: true) add_test_setup('slow') It will then be possible to run the slow tests with either `meson test --setup slow` or `meson test --suite slow`.
2021-02-01tests/common: fix " 37 has function" test on musl systems.Érico Rolim1-12/+21
This commit fixes the test that asserts on whether the lchmod() function should have been detected as available by Meson. It does so by assuming that on Linux systems not using glibc, the function will be available. - fix comment about lchmod on Linux: musl has implemented the function correctly since 2013, so the assumption in the test wasn't correct. Furthermore, musl doesn't use glibc's stub mechanism. - fix include to receive __GLIBC__ definition: including almost any header in glibc will end up defining __GLIBC__, since most headers include <features.h>. The <gnu/libc-version.h> header was probably chosen because of its name, but its actual purpose is defining functions for checking glibc version at runtime (instead of what the binary was built with), so it isn't necessary to use it. Since it is a completely non standard header, including it makes the test suite fail on musl due to not finding the header.
2021-01-30Fix executable as script on WindowsXavier Claessens4-2/+32
On Windows this would fail because of missing DLL: ``` mylib = library(...) exe = executable(..., link_with: mylib) meson.add_install_script(exe) ``` The reason is on Windows we cannot rely on rpath to find libraries from build directory, they are searched in $PATH. We already have all that mechanism in place for custom_target() using ExecutableSerialisation class, so reuse it for install/dist/postconf scripts too. This has bonus side effect to also use exe_wrapper for those scripts. Fixes: #8187
2021-01-29Can read project version from a file.Jussi Pakkanen2-1/+2
2021-01-27intepreter: Allow using file objects for the script_name of add_*_scriptDylan Baker3-0/+9
It's a bit silly and conveluted to have to call find_program on the output of configure_file, so let's just allow passing files as the script name.
2021-01-27custom_target: Add env kwargXavier Claessens2-0/+2
2021-01-25Merge pull request #8236 from ↵Jussi Pakkanen4-3/+30
dcbaker/submit/rust-fix-generated-sources-in-subdir Submit/rust fix generated sources in subdir
2021-01-23Merge pull request #8226 from jonaslb/fortranstaticJussi Pakkanen6-0/+74
Fixes for fortran: Include dirs for link_whole_targets and capital file suffix
2021-01-21tests/rust: Add a generated library to generated main testDylan Baker4-1/+19
Which is broken, of course.
2021-01-21tests/rust: Add subdir to generated sources testDylan Baker2-2/+11
2021-01-21interpreter: accept external programs and dependencies for summaryPaolo Bonzini1-0/+5
2021-01-21Add fortran test with an install:yes static libraryJonas Lundholm Bertelsen6-0/+74
This adds a test which makes use of an install:yes static library that depends on another static library. This triggers a promotion to link_whole_target inside meson which takes different code paths in certain places. Also makes use of .F90 source (capital F) to test for case (in)sensitivity.
2021-01-20ninjabackend: Correct RPATH orderFini Jastrow6-0/+44
[why] If we build and test a library we need to make sure that we find the currently build library object first, before an older system installed one. This can be broken if the library in question is installed in a custom path, and another library we depend on also is installed there. [how] Just move the rpath to the current build artifacts to the front. Solves #8030. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-19rust: Accept generated sources for main.rsDylan Baker2-0/+32
There are still caveats here. Rust/cargo handles generated sources by writing out all targets of a single repo into a single output directory, setting a path to that via a build-time environment variable, and then include those files via a set of functions and macros. Meson's build layout is naturally different, and ninja makes working with environment variables at compile time difficult. Fixes #8157
2021-01-14Merge pull request #8192 from dcbaker/submit/minstall-type-annotationsJussi Pakkanen1-1/+1
Add type annotations to minstall (and some related cleanups)
2021-01-13build/interpreter: Split InstallDir to fix layering violationDylan Baker1-1/+1
Currently InstallDir is part of the interpreter, and is an Interpreter object, which is then put in the Build object. This is a layering violation, the interperter should have a Holder for build data. This patch fixes that.
2021-01-13Fix misspellsAntonin Décimo1-2/+2
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-12Allow '//' as project function id due to git bash path conversion.Luke Elliott4-2/+29
See https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path
2021-01-12Interpreter: Fix nested subsubproject detectionXavier Claessens6-3/+13
A sub-subproject can be configured directly from `subprojects/foo/subprojects/bar/` in the case `bar` is in the same git repository as `foo` and not downloaded separately into the main project's `subprojects/`. In that case the nested subproject violation code was wrong because it is allowed to have more than one "subprojects" in path (was not possible before Meson 0.56.0). Example: - self.environment.source_dir = '/home/user/myproject' - self.root_subdir = 'subprojects/foo/subprojects/bar' - project_root = '/home/user/myproject/subprojects/foo/subprojects/bar' - norm = '/home/user/myproject/subprojects/foo/subprojects/bar/file.c' We want `norm` path to have `project_root` in its parents and not have `project_root / 'subprojects'` in its parents. In that case we are sure `file.c` is within `bar` subproject.
2021-01-10cmake: add PATH logic to preliminary dep check (fixes #8133)Daniel Mensinger4-1/+12
2021-01-05modules: Add an unstable-rust moduleDylan Baker2-0/+22
Like other language specific modules this module is module for holding rust specific helpers. This commit adds a test() function, which simplifies using rust's internal unittest mechanism. Rust tests are generally placed in the same code files as they are testing, in contrast to languages like C/C++ and python which generally place the tests in separate translation units. For meson this is somewhat problematic from a repetition point of view, as the only changes are generally adding --test, and possibly some dependencies. The rustmod.test() method provides a mechanism to remove the repatition: it takes a rust target, copies it, and then addes the `--test` option, then creates a Test() target with the `rust` protocol. You can pass additional dependencies via the `dependencies` keyword. This all makes for a nice, DRY, test definition.
2021-01-05mtest: Add support for rust unit testsDylan Baker2-0/+56
Rust has it's own built in unit test format, which is invoked by compiling a rust executable with the `--test` flag to rustc. The tests are then run by simply invoking that binary. They output a custom test format, which this patch adds parsing support for. This means that we can report each subtest in the junit we generate correctly, which should be helpful for orchestration systems like gitlab and jenkins which can parse junit XML.
2021-01-04unit:cpp17: make C++17 test stricter checkMichael Hirsch1-5/+27
many compilers allowed "nodiscard" C++17 feature with pre-c++17 flags. The C++17 filesystem typically actually does require -std=c++17. This makes this unit test more representative of C++17 flag support.
2021-01-04cmake: fix missing languages from CMake (fixes #8132)Daniel Mensinger6-0/+49
2020-12-30Handle uppercase dependency names in wraps.Jussi Pakkanen5-0/+30
2020-12-29cmake: fix -framework dependencies (fixes #8045)Daniel Mensinger2-0/+19
2020-12-14Merge pull request #8013 from mesonbuild/cppmodulesJussi Pakkanen12-0/+92
C++ module support
2020-12-13Support native tests in crossbuildOleg B2-0/+23
2020-12-11Create unit test for C++ modules and accept ixx as C++ source extension.Jussi Pakkanen12-0/+92
2020-12-03Add prelinking support for static libraries.Jussi Pakkanen8-0/+73
2020-11-29Add aarch64 assembly testmimi899991-1/+10
2020-11-24compiler: allow non-built internal dependencies as argumentsPaolo Bonzini1-0/+6
Allow methods on the compiler object to receive internal dependencies, as long as they only specify compiler/linker arguments or other dependencies that satisfy the same requirements. This is useful if you're using internal dependencies to add special "-D" flags such as -DNCURSES_WIDECHAR, -D_XOPEN_SOURCE_EXTENDED or -DGLIB_STATIC_COMPILATION.
2020-11-21Handle cmake dependencies which require a specified versionJason Ekstrand3-0/+27
Some CMake packages fail to find at all if no version is specified. This commit adds a cmake_version parameter to dependency() to allow you to specify the requested version.
2020-11-21cmVers: use env instead of hardcoding bash locationDylan Baker1-1/+1
2020-11-18Merge pull request #7894 from obilaniu/cudaupdatesJussi Pakkanen1-3/+57
Update unstable CUDA Module to support newest toolkits and drivers.
2020-11-17Revert "Add thinlto support. Closes #7493."Jussi Pakkanen1-1/+1
This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
2020-11-17gnome: Drop use of volatile in GLib type functionsPhilip Withnall4-16/+16
See https://gitlab.gnome.org/GNOME/glib/-/issues/600 `volatile` was previously mistakenly used in GLib to indicate that a variable was accessed atomically or otherwise multi-threaded. It’s not meant for that, and up to date compilers (like gcc-11) will rightly warn about it. Drop the `volatile` qualifiers. Based on a patch by Jeff Law. See also http://isvolatileusefulwiththreads.in/c/. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-14Merge pull request #7843 from dcbaker/submit/rustc-fixesJussi Pakkanen1-1/+1
A few fixups for rust