aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2020-07-30Merge pull request #7494 from keszybz/fix-two-warningsJussi Pakkanen2-2/+3
Fix two warnings
2020-07-28Only emit warning about "native:" on projects with minimum required versionZbigniew Jędrzejewski-Szmek2-2/+3
'native:' keyword was only added in 0.54. For projects declaring meson_version >= 0.54, warn, because those projects can and should set the keyword. For older projects declaring support for older versions, don't warn and use the default implicitly. Fixes https://github.com/mesonbuild/meson/issues/6849.
2020-07-28ninjabackend: check if target has compiler attributeMarcel Hollerbach1-1/+3
otherwise we are getting errors like: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/mesonbuild/mesonmain.py", line 131, in run return options.run_func(options) File "/usr/local/lib/python3.6/dist-packages/mesonbuild/msetup.py", line 245, in run app.generate() File "/usr/local/lib/python3.6/dist-packages/mesonbuild/msetup.py", line 159, in generate self._generate(env) File "/usr/local/lib/python3.6/dist-packages/mesonbuild/msetup.py", line 215, in _generate intr.backend.generate() File "/usr/local/lib/python3.6/dist-packages/mesonbuild/backend/ninjabackend.py", line 518, in generate self.generate_coverage_rules() File "/usr/local/lib/python3.6/dist-packages/mesonbuild/backend/ninjabackend.py", line 991, in generate_coverage_rules self.generate_coverage_command(e, []) File "/usr/local/lib/python3.6/dist-packages/mesonbuild/backend/ninjabackend.py", line 975, in generate_coverage_command for compiler in target.compilers.values(): AttributeError: 'RunTarget' object has no attribute 'compilers' This extends the 109 generatecode test case to also define a test, so coverage can really detect something.
2020-07-22coredata: Make warning_level per subproject builtin optionXavier Claessens3-2/+9
2020-07-21Add boost_root support to properties files (#7210)cmcneish12-0/+23
* Add boost_root support to properties files This commit implements `boost_root`, `boost_includedir`, and `boost_librarydir` variable support to native and cross properties files. The search order is currently environment variables, then these variables, and finally a platform-dependent search. * Add preliminary boost_root / boost_includedir tests Each test contains a fake "version.hpp", as that's how boost detection is currently being done. We look for this file relative to the root directory, which probably shouldn't be allowed (it previously was for BOOST_LIBRARYDIR but not for BOOST_ROOT). It also cannot help with breakage detection in libraries, however it looks like this wasn't getting tested beforehand. I've given the two unique version numbers that shouldn't be present in any stock version of boost (001 and 002). * Add return type to detect_split_root * Return empty list when nothing found in BOOST_ROOT, rather than None * Update boost_root tests * Create nativefile.ini based on location of run_project_tests.py * Add fake libraries to ensure boost_librarydir is being used * Require all search paths for boost to be absolute * Redo boost search ordering To better match things like pkg-config, we now look through native/cross files, then environment variables, then system locations for boost installations. Path detection does not fall back from one method to the next for properties or environment variables--if boost_root, boost_librarydir, or boost_includedir is specified, they must be sufficient to find boost. Likewise for BOOST_ROOT and friends. pkg-config detection is still optional falling back to system-wide detection, for Conan. (Also, fix a typo in test 33's nativefile) * Correct return type for detect_roots * Correct boost dependency search order in documentation * Print debug information for boost library finding, to resolve CI issues * Handle native/cross file templates in a more consistent way All tests can now create a `nativefile.ini.in` if they need to use some parameter that the testing framework knows about but they can't. * Pass str--rather than PosixPath--to os.path.exists, for Python35 * Look for boost minor versions, rather than boost patch versions in test cases * Drop fake dylib versions of boost_regex * Prefer get_env_var to use of os.environ * Correct error reporting for relative BOOST_ROOT paths * Bump version this appears in. Also, change "properties file" to "machine file" as that appears to be the more common language.
2020-07-21summary: Wrap lines when printing listsXavier Claessens1-0/+1
When a list_sep is provided (e.g. ', ') all items are printed on the same line, which gets ugly on very long lists (e.g. list of plugins enabled).
2020-07-20string: add substring methodStéphane Cerveau1-0/+15
This method aims to offer a simple way to 'substring' an existing string with start and end values.
2020-07-19Print a warning when importing a stabilized moduleMarc-André Lureau2-0/+9
2020-07-19Stabilize keyval moduleMarc-André Lureau5-5/+5
We have experimented with the module for about a year in a qemu branch (https://wiki.qemu.org/Features/Meson), and we would like to start moving the build system to meson. For that, keyval should have the stability guarantees. Cc: Paolo Bonzini <pbonzini@redhat.com>
2020-07-19fix msvc not recognising b_ndebugElliot Haisley2-0/+16
fixes #7404
2020-07-12simplify/correct test logicMichael Hirsch3-33/+36
before this, tests were being skipped on Ubuntu 20.04 with Anaconda Python Now, all 5 tests success
2020-07-12some python test cases don't care about backend, so run them in any caseMichael Hirsch3-14/+29
2020-07-12raise SystemExit() generally preferred to sys.exit(1)Michael Hirsch5-20/+9
2020-07-12c lang not needed for this testMichael Hirsch1-1/+2
2020-07-12setuptools is not stdlib, but distutils isMichael Hirsch1-1/+1
2020-07-12Decrease version requirement to work on Xenial.Jussi Pakkanen1-2/+2
2020-07-01wrap: Add failing unit test for fallback consistencyXavier Claessens4-0/+22
Dependency 'foo' is overriden with 'foo_dep' so using fallback variable name 'bar_dep' should abort.
2020-07-01interpreter: Don't abort if dep isn't required and sub didn't overrideXavier Claessens2-1/+8
2020-07-01interpreter: Already configured fallback should be used for optional depXavier Claessens3-0/+11
2020-07-01find_program: Fallback if a wrap file provide the program nameXavier Claessens3-0/+12
We don't need the legacy variable name system as for dependency() fallbacks because meson.override_find_program() is largely used already, so we can just rely on it.
2020-07-01wrap: Add special 'dependency_names' key in [provide] sectionXavier Claessens2-3/+3
The value for that key must be a coma separated list of dependecy names provided by that subproject, when no variable name is needed because the subproject uses override_dependency().
2020-07-01wrap: Add 'provide' sectionXavier Claessens4-2/+21
2020-07-01Implicit dependency fallback when a subproject wrap or dir existsXavier Claessens3-2/+10
2020-07-01Merge pull request #7231 from mensinda/cmOverrideJussi Pakkanen9-0/+156
cmake: Add more advanced subproject configuration options
2020-06-30wrap: Apply patch even in VCS casesXavier Claessens3-0/+11
2020-06-29test: fix enum generation for GNOMEMike Gorse1-0/+8
Fixes: #7252
2020-06-24pkgconfig: Add missing cflags in uninstalled filesXavier Claessens2-1/+6
Fixes: #7365
2020-06-22Fix "test cases/common/125 object only target" on SolarisAlan Coopersmith1-0/+2
If object is not built pic, trying to link it into libshr.so fails: [6/8] Linking target libshr.so. FAILED: libshr.so gcc -o libshr.so 'shr@sha/source2.o' -Wl,--no-undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,libshr.so -Wl,--end-group Text relocation remains referenced against symbol offset in file .text (section) 0x20 shr@sha/source2.o ld: fatal: relocations remain against allocatable but non-writable sections collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-06-22unittests: Fix test_identity_cross on SolarisAlan Coopersmith2-4/+16
Since mesonbuild/environment.py doesn't recognize Studio compilers, force use of gcc on Solaris for now. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-06-22test: Fix linuxlike/3 linker script on Solaris 11.4Alan Coopersmith1-0/+6
Solaris linker added support for GNU-style --version-script in Solaris 11.4, but requires adding the -z gnu-version-script-compat flag to enable it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-06-21wrap: Add patch_directory supportXavier Claessens3-0/+13
Copy a tree instead of extracting an archive. Closes: #7216
2020-06-17ci: Remove PostgreSQL from PATHNirbheek Chauhan2-12/+0
It's one of the causes of the cmake test failures, and it's also plaguing the VS2019 jobs now because of the image update.
2020-06-15test:fortran7: default static so Intel/VS-based compilers passMichael Hirsch1-3/+3
we did the same thing earlier with other Fortran tests for the same reason.
2020-06-15ci: Use test.json to skip VS2017 azure testsDaniel Mensinger4-14/+12
See also #7307 #7314 #7316 cc @nirbheek
2020-06-14windows: Canonicalize `:` in filenamesNirbheek Chauhan1-0/+2
Fixes https://github.com/mesonbuild/meson/issues/7265
2020-06-14fortran generated test: add code to reveal issueMichael Hirsch5-10/+22
used with Issue #7265
2020-06-14Disable failing cmake jobs on VS2017Nirbheek Chauhan2-0/+14
These only fail when building with msvc/clang-cl on the VS2017-Win2016 image. See: https://github.com/mesonbuild/meson/issues/7307
2020-06-13cmake: fix definitions with interface libraries (fixes #7299)Daniel Mensinger6-0/+22
2020-06-13cmake: Fix handling of path seperators (fixes #7294)Daniel Mensinger4-1/+21
2020-06-12modules/cmake: Fix setting install_dirDylan Baker3-0/+20
Fixes: #7301
2020-06-12cmake: Subprojects support CMAKE_PREFIX_PATH (fixes #7249)Daniel Mensinger2-0/+14
2020-06-08Merge pull request #7245 from dankegel/response-files-when-needed-tidiedJussi Pakkanen8-0/+138
Make ninja backend only use response files when needed, on linux too
2020-06-05test cases/common/234: get limit right on linux, generate fewer filesDan Kegel1-2/+25
2020-06-05Extended test case for special characters to compiler argumentsJon Turney4-0/+77
2020-06-05Add a test case for very long command linesJon Turney4-0/+38
This exercises commands of about 20K in length Also test short commandlines to make sure they don't regress.
2020-06-05cmake: Skip MSVC like compilers, since C++11 is not supportedDaniel Mensinger1-0/+5
2020-06-05cmake: added test caseDaniel Mensinger9-0/+151
2020-06-02cmake: always split property lists (fixes #7228)Daniel Mensinger1-1/+1
2020-05-27Merge pull request #6818 from mensinda/localPatchJussi Pakkanen12-8/+30
Wrap: add local files support via *_filename
2020-05-27ninja: Always use to_native on CompilerArgs (fixes #7167)Daniel Mensinger3-0/+19