aboutsummaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)AuthorFilesLines
2021-06-22interpreter: man sections can be up to 9 on many platformsDylan Baker2-2/+2
Linux and FreeBSD use section 9 for kernel man pages, so we should allow that.
2021-06-22interpreter: use typed_pos_args for install_dataDylan Baker1-1/+1
2021-06-22extract_objects: skip headers when building custom_target command linePaolo Bonzini2-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.
2021-06-22Fixed unused-parameter/strict-prototypes warnings.Justin Handville3-4/+4
2021-06-22Added test case to test fix for issue 8910.Justin Handville5-0/+84
2021-06-22extract_objects: test and document using the result in a custom_targetPaolo Bonzini2-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.
2021-06-21fix: Ensure that build targets have all methods from ExternalProgramDaniel Mensinger2-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`.
2021-06-21interpreter: Move argument checks from add_*_arguments to ↵Laurin-Luis Lehning4-10/+11
compiler.get_supported_arguments
2021-06-21interprter: Add required kwarg to add_(project|global)_argumentsLaurin-Luis Lehning2-0/+10
To avoid manual compiler support checks add_project_arguments and add_global_arguments receive a new keyword argument to perform them automatically.
2021-06-20fix: dicts and list need _holderify for fallbackDaniel Mensinger1-2/+28
2021-06-20fix: Fix set_variable not holderifying (fixes #8904)Daniel Mensinger3-0/+37
2021-06-18holders: Fix the remaining code to respect the holder changesDaniel Mensinger2-1/+4
2021-06-18modules/qt: use append rather than extend in preprocessDylan Baker1-0/+10
Because that's what we need, of course
2021-06-18interpreter: add type annotations to build_incdir_objectDylan Baker1-1/+1
and use textwrap.dedent to make the very large messages more readable and not break method folding.
2021-06-18dependency: Empty fallback is the same as allow_fallback: falseXavier Claessens3-0/+16
2021-06-17update gettext test to use new intl dependencyEli Schwartz2-3/+4
Tests that we find something sensible for intl, capable of producing binaries using gettext() to translate stuff. No more need to manually check headers and *maybe* include the intl library, which we were doing before; the new dependency actually simplifies the existing test, and should simplify users' build files too...
2021-06-17tests: update dependency factory tests to check type_name is saneEli Schwartz1-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.
2021-06-16interpreter: Extract dependency() logic into its own helper classXavier Claessens21-30/+46
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.
2021-06-16Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-moduleJussi Pakkanen1-6/+11
Rewrite the Qt module for type safety!
2021-06-15modules/qt: Add a compile_moc methodDylan Baker1-4/+4
This method only compiles moc resources, nothing else
2021-06-15modules/qt: Add a compile_ui methodDylan Baker1-1/+2
Which is the same functionality split out of preprocess
2021-06-15modules/qt: Add a `compile_resources` methodDylan Baker1-1/+5
This is a separate method for just handling qrc resources.
2021-06-15Merge pull request #8878 from dcbaker/submit/dependency-type-fixesJussi Pakkanen1-1/+1
Fix System dependencies setting type_name instead of name
2021-06-14interpreter: use typed_*args for test and benchmarkDylan Baker1-1/+1
this also requires some changes to the Rust module, as it calls into the test code.
2021-06-14Fix issue with generated Cython code in a subdirRalf Gommers3-0/+33
This is a follow-up to gh-8706, which contained the initial fix to ninjabackend.py but somehow lost it. This re-applies the fix and adds a test for it. Without the fix, the error is: ninja: error: 'ct2.pyx', needed by 'libdir/ct2.cpython-39-x86_64-linux-gnu.so.p/ct2.pyx.c', missing and no known rule to make it
2021-06-14dependencies: Use the SystemDependencyDylan Baker1-1/+1
This fixes these dependencies, which currently return the name of the dependency as the type. Fixes #8877
2021-06-08Merge pull request #8512 from bonzini/feature-methodsJussi Pakkanen4-0/+27
Utility methods for feature objects
2021-06-08interpreter: add feature.disable_auto_if()Paolo Bonzini1-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>
2021-06-08interpreter: add feature.require()Paolo Bonzini4-0/+17
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>
2021-06-07cython: Add a test for generated filesDylan Baker6-0/+104
2021-06-07cython: add 1 basic testDylan Baker7-0/+104
2021-06-02test cases/common/103 has header symbol: set c++ standardDylan Baker1-1/+5
On mac this appears to default to c++98, which in turn falls over with boost that requires at least c++11
2021-05-31interpreter: add feature.allowed()Paolo Bonzini1-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>
2021-05-29cmake: Update test caseDaniel Mensinger5-3/+31
2021-05-28tests: Add a test for dependencies with native set in a host == build ↵Dylan Baker2-0/+32
configuration
2021-05-28modules/gnome: Correctly handle generated sources for generate_girDylan Baker2-1/+27
We need to pass any generated sources down the CustomTarget inititalizers so that they will generate a dependency correctly, otherwise we get race conditions.
2021-05-27test cases: Disable whole archive test on older VS IDEChun-wei Fan1-0/+4
The pre-2015 Visual Studio IDE do not handle things correctly for this test, so disable this.
2021-05-27MSVC: Always enable common tests 137 and 170Chun-wei Fan2-15/+0
This will test the "whole archive" and "generator link whole" for all Visual C++ versions.
2021-05-23Handle macOS filesystem sometimes setting lower digits to zero.Jussi Pakkanen1-1/+15
2021-05-23Rename VERSION because case insensitive file systems are a thing.Jussi Pakkanen2-1/+1
2021-05-21Fix LTO test on CygwinJon Turney3-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
2021-05-20Revert "Disable failing Cygwin GIR test."Jon Turney5-20/+0
This partially reverts commit add502c6483bde9dc6a0ba80b3c79163304465a4.
2021-05-20Revert "Disable broken asm test on Cygwin as nobody knows how to fix it."Jon Turney1-4/+0
This reverts commit 56a0e74d711fc050c6574e2da4e2f745da6a56f5.
2021-05-20vala: Test that adding C manually isn't requiuredDylan Baker1-1/+2
2021-05-19interpreter: Automatically add 'c' to languages when 'vala' is usedDylan Baker2-9/+0
This is so dumb, we can just insert C for you without you having to know that you're using C under the hood. This is nicer because: 1) Meson doesn't make the user add a language they're not explicitly using 2) If there was ever an implementaiton of Vala that didn't use C as it's assembly language, this wouldn't make any sense.
2021-05-19.C files are now treated as C++ codeVolker-Weissmann2-0/+13
2021-05-18pkgconfig: Do not escape custom variablesXavier Claessens1-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.
2021-05-18Add a rust test for internal c linkageDylan Baker5-0/+76
We have code to support this, but no tests. That seems pretty bad. And better yet, it doesn't work on MSVC in some cases.
2021-05-13test:fortran:21: fix Windows by using configure_file(copy:)Michael Hirsch2-2/+2
2021-05-13interpreter: flatten environment() initial valuesXavier Claessens2-1/+5
Turns out listify() flattens by default, but stringlistify() cannot flatten... How do I realize this only now? Fixes: #8727