aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2019-05-29tests: Test the cmake parser more thuroughlyDylan Baker2-0/+82
It turns out there are bugs, in particular with spaces in variables...
2019-05-28interpreter: add fallback argument to subproject.get_variable()Mathieu Duponchelle1-0/+5
2019-05-28gnome: make sure the target build directory is passed first for linkingChristoph Reiter4-0/+99
determine_rpath_dirs() can return paths to external dependencies not in the build dir and passing them first as a link path leads to g-ir-scanner for example linking against the already installed library instead of the just built one. This was reported in g-i: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/272 and comes up quite often when a library adds some new symbols which aren't present in the system library, which then makes linking fail. The first place where the order is changed is _scan_gir_targets(), which looks like an unintentional change in the refactoring in 8377ea45aa61efbe8e1a75b74 The second place in _get_link_args() has always been that way and only the rpath order is changed, but it looks to me as if the same rules should apply here too.
2019-05-27coredata: add cmake_prefix_path optionDylan Baker2-0/+8
2019-05-22sourceset: add a realistic example as a testcasePaolo Bonzini23-0/+327
2019-05-22new module "sourceset" to match source file lists against configuration dataPaolo Bonzini22-0/+248
In QEMU a single set of source files is built against many different configurations in order to generate many executable. Each executable includes a different but overlapping subset of the source files; some of the files are compiled separately for each output, others are compiled just once. Using Makefiles, this is achieved with a complicated mechanism involving a combination of non-recursive and recursive make; Meson can do better, but because there are hundreds of such conditional rules, it's important to keep meson.build files brief and easy to follow. Therefore, this commit adds a new module to satisfy this use case while preserving Meson's declarative nature. Configurations are mapped to a configuration_data object, and a new "source set" object is used to store all the rules, and then retrieve the desired set of sources together with their dependencies. The test case shows how extract_objects can be used to satisfy both cases, i.e. when the object files are shared across targets and when they have to be separate. In the real-world case, a project would use two source set objects for the two cases and then do "executable(..., sources: ... , objects: ...)". The next commit adds such an example.
2019-05-21Merge pull request #5372 from dcbaker/get_variableJussi Pakkanen1-0/+52
Dependency.get_variable method
2019-05-20Generators can have extra target dependencies. Closes #4131.Jussi Pakkanen6-0/+50
2019-05-20Combine the two different pipeline test dirs into one.Jussi Pakkanen6-5/+4
2019-05-20fixup! fixup! tests: Add test for Dependency.get_variableDylan Baker1-7/+7
2019-05-16compilers/fortran: Fix all has_argument methods in mesonDylan Baker1-1/+4
Apparently we have no tests for this because this is broken pretty badly. This extends the basic test to actually check for the correct free-form argument and thus test this.
2019-05-14Merge pull request #5331 from dcbaker/iclJussi Pakkanen13-20/+25
ICL (Intel for Windows) support
2019-05-13ast: fix #5376Daniel Mensinger1-0/+7
2019-05-10tests/fortran/14: Add vsdef filesDylan Baker2-1/+3
ICL and ifort need these to pass this tests.
2019-05-10tests/fortran/9 cpp: It's okay to link ICL and ifortDylan Baker1-1/+1
This test currently assumes that the fortran compiler is gfotran, and if we're not using g++ it skips. This patch changes it to skip if the fotran compiler and the c++ compiler aren't the same family. This still may skip in some cases it shouldn't (clang and gfort probably work fine on windows), but it does enable ifort + ICL. Which is hte point.
2019-05-10tests/fortran/1: call compiler.get_id() == str instead of compiler == strDylan Baker1-1/+1
2019-05-10tests/204: Fix intel-cl expectationsDylan Baker1-2/+2
2019-05-10tests/206: Fix intel vs intel-cl expectationsDylan Baker1-8/+2
2019-05-10tests/143: Add xilib check for ICLDylan Baker1-0/+2
2019-05-10tests/132: ICL should not run this test like MSVC and clang-clDylan Baker1-1/+1
2019-05-10tests/124: ICL alos does not use ASMDylan Baker1-1/+1
2019-05-10tests/123: Add /nologo to cl and mlDylan Baker1-2/+2
To make them less chatty.
2019-05-10tests/123: For MSVC like compilers to treat the .S file like a .c fileDylan Baker1-1/+2
Which is required for ICL to work correctly, as it otherwise assumes that the .S file is a .o/.obj file.
2019-05-10tests/common/40: ICL behaves like MSVC and should be tested like itDylan Baker1-1/+1
2019-05-10test cases: Add ICL branches in addition to ICC branchesDylan Baker2-2/+8
2019-05-10tests: Add test for Dependency.get_variableDylan Baker1-0/+52
2019-05-09add support for "target_type: 'shared_module'" in build_target()Daniel Eklöf4-0/+23
2019-05-09Better detection of tab indentation.Jussi Pakkanen1-9/+9
"But surely nobody would indent by having spaces first, and tabs after that. Right? Right?"
2019-05-05add -fno-exceptions if cpp_eh=none is specified nicole mazzuca1-7/+4
2019-05-05Fix an assertion exception when misusing install_dataJon Turney3-0/+25
* Failing test case for trying to install_data a custom_target * Validate install_data() arguments are either string or file
2019-05-03cmake: LLVM better modules handlingDaniel Mensinger1-1/+1
2019-05-03LLVM: Added CMake backendDaniel Mensinger2-2/+2
2019-05-02Merge pull request #5254 from dcbaker/fix-sub-dependenciesDylan Baker3-3/+3
Fix sub dependencies
2019-05-02per-target manual specification of link_languageMichael Hirsch, Ph.D3-0/+30
2019-05-02tests: Extend tests that use Threads internally to set methodDylan Baker3-3/+3
It turns out there's a bug in creating a sub dependency out of threads in that we pass all of the kwargs from the parent to the ThreadDependency instance. This demonstrates the bug.
2019-05-02Merge pull request #5161 from TheQwertiest/feature/custom_target_linkJussi Pakkanen7-0/+291
Can link against custom_target[i]
2019-05-02mtest: check for an empty suite listPeter Hutterer3-0/+12
For consistency, it can be useful to have an explicit empty test suite list for a test: test('test-name', binary, suite: []) This currently passes meson but fails when running meson tests: Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 122, in run return options.run_func(options) File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 1005, in run return th.doit() File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 756, in doit self.run_tests(tests) File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 896, in run_tests visible_name = self.get_pretty_suite(test) File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 875, in get_pretty_suite rv = TestHarness.split_suite_string(test.suite[0])[0] IndexError: list index out of range Fix it by simply checking for the test suite to be a valid list we can pass on Fixes #5340 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-02Non-required appleframework deps should not be an error. Closes #5295.Jussi Pakkanen1-0/+3
2019-04-29Added additional tests for linking with custom_target[i]TheQwertiest6-0/+269
2019-04-29Added tests for custom_target[i]TheQwertiest1-0/+22
2019-04-28consistent invalid escape sequence behaviourJon Turney1-0/+14
* docs: document unrecognized escape sequence behaviour [skip ci] Document that unrecognized escape sequence behaviour is like python, not C. * Don't try to decode invalid hex escape sequences Don't try to decode escape sequences which should contain a sequence of hex digits, but don't, throwing a python exception. These will treated literally instead. * Extend test case to cover invalid escape sequences
2019-04-23ast: Improved test caseDaniel Mensinger1-12/+4
2019-04-23ast: Make sure to avoid infinite recursionsDaniel Mensinger1-0/+14
2019-04-23ast: support elementary object methodsDaniel Mensinger1-3/+2
2019-04-23ast: resolve simple arithmetic nodesDaniel Mensinger1-1/+4
2019-04-23ast: resolve ID nodes in flatten_argsDaniel Mensinger1-1/+3
2019-04-22Remove extra directory in failing testJon Turney1-0/+0
So it failing tests what it claims, rather than that an directory without a meson.build fails...
2019-04-22i18n: add args keyword to merge_fileKonstantin6-3/+42
* i18n: add args keyword to merge_file * i18n: add testcase to msgfmt args
2019-04-21Merge pull request #5289 from mesonbuild/fixxpassJussi Pakkanen4-9/+29
Report xpass results as failures.
2019-04-21Make it work on Cygwin.Jussi Pakkanen2-9/+24