aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-23mtest: do not process zero byte reads in read_decode()mtesttempHemmo Nieminen1-4/+5
AsyncIO.StreamReader.readuntil() occasionally raises IncompleteRead exception before a byte of data has been read. Do not process the "read" data in those cases.
2022-03-23mtest: enable access to the console logger instanceHemmo Nieminen1-3/+7
Store a reference to the console logger instance in a test harness' member variable to allow accessing it (and its logging utilities) from any other functions in test harness. This added functionality will be used in future commits.
2022-03-23mtest: store all test results directly to TestRunHemmo Nieminen1-60/+57
Store return code, test result and additional error directly to the relevant TestRun instance. This reduces the number of individual arguments to other relevant functions that need to be passed around and thus simplifies the code. The test output (and error) were earlier similarly moved to be stored directly to the TestRun instance for the same reason.
2022-03-23mtest: store test output directly to a TestRun objectHemmo Nieminen1-33/+48
By storing test output directly to the TestRun instance we avoid the need to pass the outputs around in individual function arguments thus simplifying the code. The amount of individual arguments will be further reduced in a future commit.
2022-03-23mtest: print only one empty line before test summaryHemmo Nieminen1-1/+0
2022-03-23mlog: add support for italic/emphasized text in AnsiTextHemmo Nieminen1-0/+3
2022-03-23mtest: improve text test log formattingHemmo Nieminen1-13/+17
Write additional metadata such as exit details and try to visually differentiate the tests better from each other in the (textual) test logs.
2022-03-23mtest: differentiate stdout and stderr in test log text filesHemmo Nieminen1-2/+7
Make --no-stdsplit option affect test log text files as well. This means that if the option --no-stdsplit is used only "output" is seen not only on the console but in the test log text file as well.
2022-03-23mtest: print "live" test output when verbose with only 1 testHemmo Nieminen1-0/+2
Since running only one test sort of implies --num-processes=1 the "live" output of the test should be printed out when --verbose option has been given and running only a single test.
2022-03-23mtest: remove unused arguments from read_decode_lines()Hemmo Nieminen1-7/+5
The only time the argument would matter (console_mode == ConsoleUser.STDOUT) never happens as the only time the function is ever called is when parsing of the output is needed which in turns implies that console_mode != ConsoleUser.STDOUT.
2022-03-23mtest: introduce get_test_num_prefix() helper functionHemmo Nieminen1-5/+6
2022-03-23mtest: split TestRun's get_details() to multiple functionsHemmo Nieminen1-5/+11
These new functions will be used individually in later commits.
2022-03-23mtest: make ConsoleLogger's detail property a functionHemmo Nieminen1-8/+7
As fetching the returned data is non-trivial (we e.g. iterate over all subtest results) it is best not to hide that fact from the caller of the property / function.
2022-03-23mtest: show "timed out" messages with --print-errorlogs optionHemmo Nieminen1-1/+2
2022-03-23mtest: fix a couple of minor whitespace / typing issuesHemmo Nieminen1-5/+9
2022-03-22interpreter: Make compiler options per-subprojectXavier Claessens9-7/+67
2022-03-22coredata: Do not forget subproject's default_optionsXavier Claessens1-6/+9
2022-03-22OptionOverrideProxy: Handle per-subproject optionsXavier Claessens2-17/+25
2022-03-22OptionOverrideProxy: Make it immutable to avoid copiesXavier Claessens14-74/+70
It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it.
2022-03-22backends: Stop separating base and compiler optionsXavier Claessens5-25/+18
Since OptionKey is used we can mix all options together in a single dictionary. That's already what we do in coredata.options.
2022-03-22unittests: Fix rpath tests no nixosDylan Baker1-0/+3
Which insert a bunch of rpath entries we strip, but then don't check if they're empty and fail anyway.
2022-03-22envconfig: use $PKG_CONFIG for pkg-config find_program as well as pkgconfigDylan Baker1-0/+1
It looks like internally we use pkgconfig, even though the installed name is pkg-config. This fixes `tests cases/common/44 pkgconfig-gen`, which will ignore PKG_CONFIG and select the wrong pkg-config binary if you have $PKG_CONFIG set.
2022-03-22tests/common/44: Prepend to PKG_CONFIG_PATh instead of replacing itDylan Baker2-4/+10
Which is required to make this test work when PKG_CONFIG_PATH is required to get a working system, such as on nixos
2022-03-22tests/linuxlike: prepend rather than override PKG_CONFIG_PATHDylan Baker1-5/+17
If you rely on PKG_CONFIG_PATH to make anything work (like nixos) then these tests cannot pass without the system values appended to the override values.
2022-03-22tests/linuxlike: Honor PKG_CONFIG envvarDylan Baker1-14/+16
For some of us, we need to use this to get the right pkg-config. If the variable is unset, `'pkg-config'` is used.
2022-03-22compilers: fix mypy warning in Rust detectionDylan Baker1-0/+1
2022-03-22Add ability to add resources to jarsTristan Partin9-7/+101
Previously Meson lacked the ability to add resources to jar files. Fixes #9945
2022-03-22Bump version number for new development.Jussi Pakkanen1-1/+1
2022-03-21Prepare the 0.62.0 release.0.62.0Jussi Pakkanen34-373/+412
2022-03-21Merge pull request #10147 from dcbaker/submit/structured-sources-subdirJussi Pakkanen13-20/+54
structured_sources: fix subdir handling
2022-03-21tests/rust: renumber structred sources testDylan Baker10-0/+0
2022-03-21ninja: fix handling of rust structured_sources in rare caseDylan Baker5-4/+42
In the even that all of the inputs are generated, and they're all generated into the same folder, and there are no subfolders, we would fail to correctly handle all of the files after the main file. Let's fix that.t
2022-03-20modules/rust: set bindgen include_dirs for both build and source dirDylan Baker1-1/+2
Which we pretty obviously need if any of our headers are generated
2022-03-20docs: fix incorrect default for test is_parallelEli Schwartz1-1/+1
In the original RefMan 2.0 implementation, this incorrectly started claiming that the default is false. Fixes #10155
2022-03-18structured_sources: fix subdir handlingDylan Baker3-16/+12
We currently don't handle subdirectories correctly in structured_sources, which is problematic. To make this easier to handle correctly, I've simply changed `structured_sources` to only use Files and not strings as an implementation detail.
2022-03-18gnome module: fix incorrect lookup of nonexistent dependencies in post_installEli Schwartz1-3/+3
While gtk+-3.0 / gtk4 do exist, they have never provided the location of the gtk-update-icon-cache program as a pkgconfig variable. Trying to find one anyway, resulted in two things happening: - a useless dep lookup - a fatal-meson-warnings error and build failure because the get_pkgconfig_variable() in question never existed The desktop-file-utils package is a package solely providing some command line programs, and has never provided a pkg-config file in the first place, so this always logged that the dependency was not found and fell back to normal find_program_impl(), although without fatal-meson-warnings build errors. Fixes #10139
2022-03-18tests: make python2 dependency on 32-bit windows non-fatalEli Schwartz1-6/+18
Apparently Azure provides 64-bit python2 when we try to test 32-bit, and that breaks everything on the 32-bit test runner. I don't understand the environment setup, and that runner is disappearing soon anyway. Hopefully this shuts up the known breakage.
2022-03-17tests: don't skip python version tests if python is found but its dep is brokenEli Schwartz1-10/+6
If a version of python is installed for testing against, we should assume it's actually important to test against it.
2022-03-16unittests: convert python tests to project testsEli Schwartz7-39/+15
Perhaps when this test case was originally created, project tests could not use a matrix of options? This is certainly possible today, so don't write special unittest handling for this instead. This adds proper visibility into what gets run and what doesn't. Now we know which python executables got tested and which got skipped.
2022-03-16fix detection of language standard library pathsPaolo Bonzini2-20/+10
The code in the C++ and Fortran compilers' language_stdlib_only_link_flags method is broken and cannot possibly have ever worked. Instead of splitting by line, it splits by whitespace and therefore, instead of the last line of the compiler output: programs: =/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin libraries: =/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0 it is only the last field that has its first 11 characters removed. Instead of reinventing the wheel with a new and brittle pattern, reuse get_compiler_dirs. Fixes: 64c267c49 ("compilers: Add default search path stdlib_only_link_flags", 2021-09-25) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-16coredata: be even more robust on unpickling errorsPaolo Bonzini1-1/+1
When reverting from 0.62 to 0.59, one can see an error like this: line 1003, in load obj = pickle.load(f) File "/Users/pm215/src/qemu-for-merges/meson/mesonbuild/mesonlib/universal.py", line 2076, in __setstate__ self.__init__(**state) # type: ignore TypeError: __init__() got an unexpected keyword argument 'module' FAILED: build.ninja Raise a MesonException for TypeError as well, so that reconfiguration proceeds using cmd_line.txt.
2022-03-16python: Remove warning about invalid install pathXavier Claessens1-9/+0
It was originally added because proper detection was not working on Debian, but that has been fixed since. It was causing annoying warning by default when prefix is /usr/local that can only be avoided by setting options.
2022-03-15Bump version number for rc2.0.62.0rc2Jussi Pakkanen1-1/+1
2022-03-15Revert "devenv: Set PYTHONPATH where we install python modules"Eli Schwartz8-94/+7
This reverts commit 79c6075b560dbf1c3e4e0b30f1c472dc2086421e. # Conflicts: # docs/markdown/snippets/devenv.md # mesonbuild/modules/python.py # test cases/unit/91 devenv/test-devenv.py PYTHONPATH cannot be reliably determined. The standard use case for installing python modules with Meson is mixed pure sources (at least `__init__.py`) and compiled extension_modules or configured files. Unfortunately that doesn't actually work because python will not load the same package hierarchy from two different directories, one a source directory and one a (mandatory) out of tree build directory. (It kind of can, but you need to do what this test case accidentally stumbled upon, which is namespace packages. Namespace packages are a very specific use case and you are NOT SUPPOSED to use them outside that use case, so people are not going to use them just to circumvent Meson devenv stuff as that would have negative install-time effects.) Adding PYTHONPATH anyway will just lead to documentation commitments which we cannot actually uphold, and confusing issues at time of use because some imports *will* work... and some will *not*. The end result will be a half-created tree of modules which just doesn't work together at all, but because it partially works, users attempting to debug it will spend time wondering why parts of it do import. For any case where the automatic devenv would work correctly, it will also work correctly to use `meson.add_devenv()` a single time, which is very easy to manually get correct and doesn't provide any significant value to automate. In the long run, an uninstalled python package environment will require "editable installs" support.
2022-03-14sourceset: reorder fields in SourceSetRulePaolo Bonzini1-10/+10
Keep conditions first, then "if true" fields, and the if_false sources last. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-14sourceset: document fields of SourceSetRulePaolo Bonzini1-0/+12
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-14sourceset: improve typing of SourceSetRulePaolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-14sourceset: reinstate extra_depsPaolo Bonzini2-4/+6
Dependencies in the "if_true" keyword argument do not prevent the sources from being used; in other words, they work just like dependencies with "disabler: false". However, this was broken in commit ab0ffc6a2 ("modules/sourceset: Fix remaining typing issues", 2022-02-23) which changed logic instead of just fixing typing issues. This was likely an attempt to avoid using "dependencies.Dependency" after the "dependencies" field was declared, but it also broke QEMU. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-14sourceset: rename "dependencies" fields to depsPaolo Bonzini1-6/+6
The dependencies field clashes with the dependencies module, so that mypy interprets "dependencies.Dependency" as a "Dependency" attribute of the "dependencies" field. Rename the field to something else, so that it does not clash. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-13gnome module: fix crash due to misused function while generating gir commandEli Schwartz1-3/+3
In commit 68e684d51f1e469e0d9f4b499ffda15146cad98a the _get_link_args function was modified from returning a list[str] of arguments, to a tuple of both that and a modified copy of the entire target's current/enhanced dependencies (why not just the new ones? I don't know). However, the existing use of the function was not adapted to this change, and tried to turn this entire tuple into a node of the command line. Tuples cannot flatten to lists, and mesonlib.File or HoldableObjects don't make good command line arguments. As a result we errored out with: ERROR: Argument (['-L/path/to/builddir/', '--extra-library=foo'], [<SharedLibrary 25a6634@@foo@sha: foo>, <SharedLibrary 25a6634@@foo@sha: foo>, <SharedLibrary 25a6634@@foo@sha: foo>]) in "command" is invalid Split out the flags and the dependencies and update the former while replacing the latter.