summaryrefslogtreecommitdiff
path: root/test cases/common
Commit message (Collapse)AuthorAgeFilesLines
* editorconfig: add setting to trim trailing whitespaceEli Schwartz2021-08-1530-30/+7
| | | | | | | and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
* interpreter: Fix list contains for Holders (fixes #9020 #9047)Daniel Mensinger2021-08-094-0/+24
|
* Escape path in exclude filter passed to gcovrAlois Wohlschlager2021-08-042-0/+7
| | | | | | Gcovr interprets exclude filters, as passed to the -e option, as regexes. Since we want to exclude a raw path, the argument must be escaped.
* build: learn to take CustomTargetIndex as custom_target commandMarc-André Lureau2021-07-271-0/+6
| | | | | | Fix ERROR: Argument <CustomTargetIndex:...>[0]> in "command" is invalid. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* Add support for gcovr --sonarqube reportWeston Schmidt2021-07-231-0/+1
| | | | | | | | Sonarcloud.io only can read the sonarqube based report that gcovr can produce. This change enables support for this output in meson and ninja. Signed-off-by: Weston Schmidt <Weston_Schmidt@alumni.purdue.edu>
* Condense test directory names for next release.Jussi Pakkanen2021-07-159-0/+0
|
* fix: Fix recursive _unholder permissive kwarg (fixes #8977)Daniel Mensinger2021-07-101-0/+2
|
* Merge pull request #8950 from dcbaker/submit/import-required-disabledJussi Pakkanen2021-07-032-0/+16
|\ | | | | Add required and disabled to import, modules.found method
| * interpreter: add required and disabled to importDylan Baker2021-06-302-0/+16
| | | | | | | | | | | | | | This is useful both from the perspective of optional functionality that requires a module, and also as I continue to progress with Meson++, which will probably not implement all of the modules that Meson itself does.
* | Flatten test suite valueTristan Partin2021-07-021-1/+1
| | | | | | | | This behavior is more inline with the rest of Meson
* | fix: get_variable default variables are not ObjectHolders (fixes #8936)Daniel Mensinger2021-07-021-0/+6
|/
* Add feed arg to custom_target()Simon Ser2021-06-294-0/+44
|
* build: fix object path for vs backendDenis Fortin2021-06-286-2/+44
|
* refactor: Refactor BothLibraries logicDaniel Mensinger2021-06-261-0/+8
| | | | | | | | | This commit introduces a new type of `HoldableObject`: The `SecondLevelHolder`. The primary purpose of this class is to handle cases where two (or more) `HoldableObject`s are stored at the same time (with one default object). The best (and currently only) example here is the `BothLibraries` class.
* Merge pull request #8912 from mensinda/fixBothLibrariesJussi Pakkanen2021-06-2318-19/+47
|\ | | | | Fix `BothLibraries` processing
| * tests: both_library test improvementsDaniel Mensinger2021-06-2218-19/+47
| | | | | | | | | | This switches some `shared_library()` calls to `library()` and adds one new CI matrix entries for -Ddefault_library={static, both}.
* | Merge pull request #8905 from mensinda/refactorFixJussi Pakkanen2021-06-223-0/+63
|\ \ | | | | | | fix: Fix set_variable not holderifying (fixes #8904)
| * | fix: dicts and list need _holderify for fallbackDaniel Mensinger2021-06-201-2/+28
| | |
| * | fix: Fix set_variable not holderifying (fixes #8904)Daniel Mensinger2021-06-203-0/+37
| | |
* | | Add Visual Studio 2012/2013 backends (#8803)fanc9992021-06-221-6/+5
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * backends: Add a Visual Studio 2013 backend This is more-or-less a quick port from the VS2015 backend, except that we update the Visual Studio version strings and toolset versions accordingly. Also correct the generator string for Visual Studio 2015 in mesonbuild/cmake/common.py. * backend: Add VS2012 backend Similar to what we did for Visual Studio 2013, add a Visual Studio 2012 backend. * vs2010backend.py: Implement `link_whole:` if needed We actually need Visual Studio 2015 Update 2 to use `/WHOLEARCHIVE:`, which is what we are currently using for `link_whole:` on Visual Studio. For Visual Studio versions before that, we need to expand from the static targets that were indicated by `link_whole:`, and any of the sub-dependent targets that were pulled in via the dependent target's `link_whole:`. This wil ensure `link_whole:` would actually work in such cases. * vs2010backend.py: Handle objects from generated sources Unforunately, we can't use backends.determine_ext_objs() reliably, as the Visual Studio backends handle this differently. * vs2010backend.py: Fix generating VS2010 projects Visual Studio 2010 (at least the Express Edition) does not set the envvar %VisualStudioVersion% in its command prompt, so fix generating VS2010 projects by taking account into this, so that we can determine the location of vcvarsall.bat correctly. * whole archive test: Disable on vs2012/2013 backends too The Visual Studio 2012/2013 IDE has problems handling the items that would be generated from this test case, so skip this test when using --backend=vs[2012|2013]. This test does work for the Ninja backend when VS2012 or VS2013 is used, though. Consolidate this error message with XCode along with the vs2010 backend. * docs: Add the new vs2012 and vs2013 backends Let people know that we have backends for vs2012 and 2013. Also let people know that generating Visual Studio 2010 projects have been fixed and the pre-vs2015 backends now handle the `link_whole:` project option.
* | Merge pull request #8900 from bonzini/extract-objects-docsJussi Pakkanen2021-06-223-1/+35
|\ \ | | | | | | extract_objects: fixes, tests and documentation for using the result in a custom_target
| * | extract_objects: skip headers when building custom_target command linePaolo Bonzini2021-06-222-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | As seen in the testcase, passing objects to custom_target does not work if headers are passed extract_objects(), or if extract_all_objects() is used and the sources include any header files. To fix this, use the code that already exists for unity build to filter out the nonexistent ".h.o" files. This already gives for free the handling of genlist, which was mentioned in a TODO comment.
| * | extract_objects: test and document using the result in a custom_targetPaolo Bonzini2021-06-222-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | QEMU would like to use the result of extract_objects in a custom_target; examples are using objcopy, or using the object files as the key to look up command line arguments in compile_commands.json. This is slightly peculiar and not covered by the test suite, but it works; in order to avoid regressions, add a test case and document it.
* | | fix: Ensure that build targets have all methods from ExternalProgramDaniel Mensinger2021-06-212-0/+14
| |/ |/| | | | | | | | | | | As a side-effect from #8885 `find_program()` returns now `Executable` objects when `meson.override_find_program` is called with an executable target. To resolve this conflict the missing methods from `ExternalProgram` are added to `BuildTarget`.
* | holders: Fix the remaining code to respect the holder changesDaniel Mensinger2021-06-181-0/+3
|/
* tests: update dependency factory tests to check type_name is saneEli Schwartz2021-06-171-11/+26
| | | | | | | | | | | | | | Since we pass a method: 'foo' to every one of these config-tool/pkg-config dependencies, we do not ever need to check which type_name it has; change these to asserts instead. In the process, we discover a bug! We kept checking for type 'configtool' instead of 'config-tool', so these tests all short-circuited and checked nothing. Once moved to an assert, the asserts failed. Add a new lookup for a known system dependency and make it assert that too.
* interpreter: Extract dependency() logic into its own helper classXavier Claessens2021-06-162-0/+15
| | | | | | | The dependency lookup is a lot of complex code. This refactor it all into a single file/class outside of interpreter main class. This new design allows adding more fallbacks candidates in the future (e.g. using cc.find_library()) but does not yet add any extra API.
* Merge pull request #8512 from bonzini/feature-methodsJussi Pakkanen2021-06-081-0/+15
|\ | | | | Utility methods for feature objects
| * interpreter: add feature.disable_auto_if()Paolo Bonzini2021-06-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a method to downgrade an option to disabled if it is not used. This is useful to avoid unnecessary search for dependencies; for example dep = dependency('dep', required: get_option('feature').disable_auto_if(not foo)) can be used instead of the more verbose and complex if get_option('feature').auto() and not foo then dep = dependency('', required: false) else dep = dependency('dep', required: get_option('feature')) endif or to avoid unnecessary dependency searches: dep1 = dependency('dep1', required: get_option('foo')) # dep2 is only used together with dep1 dep2 = dependency('dep2', required: get_option('foo').disable_auto_if(not dep1.found())) ``` Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * interpreter: add feature.require()Paolo Bonzini2021-06-081-0/+5
| | | | | | | | | | | | | | Add a method to perform a logical AND on a feature object. The method also takes care of raising an error if 'enabled' is ANDed with false. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * interpreter: add feature.allowed()Paolo Bonzini2021-05-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method simplifies the conversion of Feature objects to booleans. Often, one has to use the "not" operator in order to treat "auto" and "enabled" the same way. "allowed()" also works well in conjunction with the require method that is introduced in the next patch. For example, if get_option('foo').require(host_machine.system() == 'windows').allowed() then src += ['foo.c'] config.set10('HAVE_FOO', 1) endif can be used instead of if host_machine.system() != 'windows' if get_option('foo').enabled() error('...') endif endif if not get_option('foo').disabled() then src += ['foo.c'] config.set10('HAVE_FOO', 1) endif Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | test cases/common/103 has header symbol: set c++ standardDylan Baker2021-06-021-1/+5
|/ | | | | On mac this appears to default to c++98, which in turn falls over with boost that requires at least c++11
* tests: Add a test for dependencies with native set in a host == build ↵Dylan Baker2021-05-282-0/+32
| | | | configuration
* test cases: Disable whole archive test on older VS IDEChun-wei Fan2021-05-271-0/+4
| | | | | The pre-2015 Visual Studio IDE do not handle things correctly for this test, so disable this.
* MSVC: Always enable common tests 137 and 170Chun-wei Fan2021-05-272-15/+0
| | | | | This will test the "whole archive" and "generator link whole" for all Visual C++ versions.
* Handle macOS filesystem sometimes setting lower digits to zero.Jussi Pakkanen2021-05-231-1/+15
|
* Rename VERSION because case insensitive file systems are a thing.Jussi Pakkanen2021-05-232-1/+1
|
* Fix LTO test on CygwinJon Turney2021-05-213-6/+15
| | | | | | | | | | | | | | This partially reverts commit add502c6483bde9dc6a0ba80b3c79163304465a4. In 'linkshared' test, annotate cppfunc() as imported, so an indirection through an import stub is generated, avoiding a relocation size error when building using gcc for Cygwin with LTO on. Align with the example of how to write this portably in [1]. The 'c' language part of that test already gets this right. [1] http://gcc.gnu.org/wiki/Visibility
* Revert "Disable broken asm test on Cygwin as nobody knows how to fix it."Jon Turney2021-05-201-4/+0
| | | | This reverts commit 56a0e74d711fc050c6574e2da4e2f745da6a56f5.
* .C files are now treated as C++ codeVolker-Weissmann2021-05-192-0/+13
|
* pkgconfig: Do not escape custom variablesXavier Claessens2021-05-181-0/+4
| | | | | | | | We need to escape space in variables that gets into cflags or libs because otherwise we cannot split compiler args when paths contains spaces. But custom variables are unlikely to be path that gets used in cflags/libs, and escaping them cause regression in GStreamer that use space as separator in a list variable.
* interpreter: flatten environment() initial valuesXavier Claessens2021-05-132-1/+5
| | | | | | | Turns out listify() flattens by default, but stringlistify() cannot flatten... How do I realize this only now? Fixes: #8727
* modules/fs: support FileOrString argumentsFlorian Fischer2021-05-082-1/+29
| | | | | | | | | | | | | | With this change File objects created with the builtin files() function can be used with the fs submodule like normal strings. All methods that seem reasonable support FileOrSting arguments. For example fs.exists() still only takes str arguments because meson already ensures that File objects do exist when creating them with files(). Each user facing function of the fs module has an additional FeatureNew check when used with File objects. The test cases for fs are extended appropriately with tests for File objects.
* test cases: Add test ensuring that -include in gcc won't break pchMarco Trevisan (Treviño)2021-05-084-0/+36
| | | | | | | | | This is just forcing the usage of -include as c_args, even though this particular case can happen easily when this is provided via a dependency cflags. We also ensure that both the headers are included by using locale definitions.
* Condense test directory names.Jussi Pakkanen2021-04-261077-0/+0
|
* Merge if and else tests to a single project.Jussi Pakkanen2021-04-263-12/+12
|
* Xcode: some more skips.Jussi Pakkanen2021-04-241-0/+5
|
* Xcode: fix linking to customtargetindex objects.Jussi Pakkanen2021-04-243-12/+30
|
* Xcode: one more skip.Jussi Pakkanen2021-04-231-0/+4
|
* Xcode: a few more skips.Jussi Pakkanen2021-04-232-0/+8
|