aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-21mlog: add __str__ method to AnsiDecoratorPaolo Bonzini3-19/+7
Automatically colorize the text when printing the AnsiDecorator, based on the result of mlog.colorize_console(). This is how AnsiDecorator is used most of the time anyway.
2021-01-20external_project: Log configure commandXavier Claessens1-0/+4
2021-01-20MSVC and Clang-Cl Compiler Argument CleanupMarios Staikopoulos2-27/+22
This commit performs some cleanup for the msvc and clang-cl arguments. * "Disable Debug" (`/Od`) is no longer manually specified for optimization levels {`0`,`g`} (it is already the default for MSVC). * "Run Time Checking" (`/RTC1`) removed from `debug` buildtype by default * Clang-CL `debug` buildtype arguments now match MSVC arguments * There is now no difference between `buildtype` flags and `debug` + `optimization` flags
2021-01-20Avoid accidental use of STANDALONE_WASM mode on compiler testsBrion Vibber1-1/+1
Compiler tests, such as checking for atomics support, could fail when compiling to WebAssembly multithreaded targets because the compiler tests got compiled to 'output.wasm'. Using the '.wasm' suffix in recent versions of emscripten engages STANDALONE_WASM mode, which disables features that require a JS runtime like shared memory. This created false negatives on support of those features when building a library to be linked into an executable that is not in STANDALONE_WASM mode. Changing these to 'output.o' will continue to produce WebAssembly object files, but they will no longer be configured for standalone runtime mode.
2021-01-20Added "How do I use a library before declaring it?" in the FAQ.Volker Weißmann1-0/+17
2021-01-20Merge pull request #8225 from bonzini/mtest-asyncio-cleanupsJussi Pakkanen1-151/+232
mtest: cleanups and bugfixes
2021-01-20unittests: Remove double install for case 10Fini Jastrow1-5/+2
[why] In test case 10 the project is installed twice. This has been introduced with commit 55abe16 unit tests: Test that relative install_rpath works correctly where the cxx tests where added by copy and paste. [how] First test all build rpaths, then after install all install rpaths. [note] The aforementioned commit is a bit strange in that it adds a tests with a relative rpath with cxx files but not with c files. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-20ninjabackend: Correct RPATH orderFini Jastrow8-19/+86
[why] If we build and test a library we need to make sure that we find the currently build library object first, before an older system installed one. This can be broken if the library in question is installed in a custom path, and another library we depend on also is installed there. [how] Just move the rpath to the current build artifacts to the front. Solves #8030. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-20Merge pull request #8158 from dcbaker/submit/rust-generated-mainJussi Pakkanen5-22/+70
rust: Accept generated sources for main.rs
2021-01-20mtest: collect stdout/stderr even in verbose modePaolo Bonzini1-14/+27
Using verbose mode dropped stdout/stderr from the logs, because it was not captured. Now that we can easily stick code in the middle of the reading of stdout/stderr, use that to print stdout and stderr on the fly while also capturing them for the logs. The output is line-buffered. As a side effect, this also fixes a possible deadlock due to not using ensure_future around stdo_task and stde_task. In particular: - the stdo_task coroutine would not terminate until the test closed stdo_task - the stde_task coroutine would not start until the stdo_task coroutine finished Therefore, the test could get stuck waiting for its parent to read the contents of stderr, but that would not happen because Meson was still in the stdo_task coroutine.
2021-01-19Keep buildtype the same even if user changes debug and/or optimization.Jussi Pakkanen5-60/+86
2021-01-19backend/ninja: Add order dependencies for generated sources in rustDylan Baker1-2/+5
2021-01-19rust: Accept generated sources for main.rsDylan Baker4-8/+60
There are still caveats here. Rust/cargo handles generated sources by writing out all targets of a single repo into a single output directory, setting a path to that via a build-time environment variable, and then include those files via a set of functions and macros. Meson's build layout is naturally different, and ninja makes working with environment variables at compile time difficult. Fixes #8157
2021-01-19Replace NinjaBackend is_rust_target with build.uses_rustDylan Baker3-12/+5
we have two functions to do the exact same thing, and they're basically implemented the same way. Instead, let's just use the BuildTarget one, as it's more generally available.
2021-01-18Fix cases where text leaks to stdout in unit tests.Jussi Pakkanen1-2/+2
2021-01-17Do not store config parser object in Wrap object. Closes: #7920.Jussi Pakkanen1-11/+11
2021-01-17Removal of /ZI on MSVC DebugMarios Staikopoulos3-6/+21
The /ZI flag adds in "Edit and Continue" debug information, which will cause massive slowdown. It is not a flag that we should be adding by default to debug builds. /Zi will still be added.
2021-01-17external_project: Write output in log files when not verboseXavier Claessens1-2/+7
2021-01-15mtest: move I/O handling to TestSubprocessPaolo Bonzini1-36/+44
Move the logic to start the read/decode tasks to TestSubprocess and keep SingleTestRunner simple. The lines() inner function is tweaked to produce stdout as a future. This removes the nonlocal access (which is not possible anymore when the code is moved out of _run_cmd), and also lets _run_cmd use "await stdo_task" for both parsed and unparsed output.
2021-01-15mtest: tweak the gathering of stdo_task/stde_task resultsPaolo Bonzini1-9/+14
After the next patch, we will need to complete parse_task before stdo_task (because parse_task will not set the "stdo" variable anymore but it will still collect stdout just like now). Do the change now to isolate the more complicated changes.
2021-01-15mtest: disable the progress report in gdb modePaolo Bonzini1-3/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-15mtest: introduce ConsoleUserPaolo Bonzini1-2/+22
This new enum can be used by TestSubprocess and TestHarness to understand (at a higher level) how SingleTestRunner sets up stdout/stderr redirection.
2021-01-15mtest: turn TestRun into a hierarchyPaolo Bonzini1-91/+128
Make SimpleTestRunner oblivious of the various test protocols. All the different "complete_*" and "parse_*" methods move to the subclasses of TestRun.
2021-01-15mtest: pass command line to TestRun.startPaolo Bonzini1-18/+16
The command line is already available when the test is started. Pass it to TestRun.start instead of TestRun.complete*.
2021-01-15mtest: add complete_skip to TestRunPaolo Bonzini1-1/+4
2021-01-15mtest: simplify complete_exitcodePaolo Bonzini1-8/+5
There is no need anymore to pass the JUnit XML down to complete_exitcode. Just set self.junit in complete_gtest instead.
2021-01-15mtest: store the environment in the TestRunPaolo Bonzini1-1/+1
The test_env was lost from the TestRun object in commit 30741a0f2 ("mtest: create TestRun object early on"). Fix things.
2021-01-15mtest: do not print time out message twicePaolo Bonzini1-2/+0
Rebase mistake in "mtest: move timeout message to ConsoleLogger".
2021-01-14mtest: allow quickly interrupting the test runPaolo Bonzini2-5/+22
The new behavior of interrupting the longest running test with Ctrl-C is useful when tests hang, but not when the run is completely broken for some reason. Psychology tells us that the user will compulsively spam Ctrl-C in this case, so exit if three Ctrl-C's are detected within a second.
2021-01-14mtest: fix flake8Paolo Bonzini1-2/+2
2021-01-14coredata: Add missing nopromote wrap_mode choiceXavier Claessens2-1/+7
2021-01-14Merge pull request #8192 from dcbaker/submit/minstall-type-annotationsJussi Pakkanen11-161/+238
Add type annotations to minstall (and some related cleanups)
2021-01-14Add qtcreator to IDE-integration.mdgaal-dev1-0/+1
2021-01-13run_mypy: add minstallDylan Baker1-0/+1
2021-01-13minstall: Fix signature of monkeypatched os.chownDylan Baker1-3/+12
this also clears up the last of the mypy problems in minstall, yay!
2021-01-13minstall: Pass destdir and fullprefix instead of adding them to instanceDylan Baker1-25/+25
Same idea as the last patch, just different data
2021-01-13minstall: Pass DirMaker separately instead of adding to instanceDylan Baker1-24/+23
Add a new attribute to an object outside of the initializer of construtor is considered an antipattern for good reason, it's gross, it's confusing, and it often leads to AttributeErrors down some paths. Let's not do that.
2021-01-13minstall: Add type annotationsDylan Baker1-31/+64
This adds annotations and fixes a couple of issues (passing Set[bytes] where List[byte] is expected), however, there's some very gross addition of attributes to types going on that I haven't fixed yet, and mypy is very grump about.
2021-01-13backends/backends: Add type annotations for InstallDataDylan Baker1-27/+36
This adds enough type annotations for InstallData and friends to make minstall happy. There is also a small change in that I've replaced the List[List] with List[Tuple], as tuples are more appropraite data types for the information (fixed length, position matters, different types at different indexes)
2021-01-13build/interpreter: Split InstallDir to fix layering violationDylan Baker4-33/+44
Currently InstallDir is part of the interpreter, and is an Interpreter object, which is then put in the Build object. This is a layering violation, the interperter should have a Holder for build data. This patch fixes that.
2021-01-13build: Add some type annotationsDylan Baker2-12/+20
2021-01-13build/interperter: Add annotations and move input validation to interpreterDylan Baker5-17/+20
This moves the user input validation to the interpreter, instead of being in the build module, and adds type annotations.
2021-01-13minstall: fix importsDylan Baker1-6/+10
This uses PEP8 style, one per from `import mod`, but with commas from `from mod import a, b`. Also run sort, for niceness.
2021-01-13scripts/depfixer: make rpaths_dirs_to_remove a setDylan Baker1-4/+4
It's only used for doing an `if x in container` check, which will be faster with a set, and the only caller already has a set, so avoid we can avoid a type conversion as well.
2021-01-13Fix misspellsAntonin Décimo40-67/+67
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13gen_data.py: even more sortingEli Schwartz2-97/+97
glob.glob() is not sorted, despite using shell-style wildcards, and the documentation does not mention this: https://bugs.python.org/issue21748 Recently, it does start mentioning "Whether or not the results are sorted depends on the file system." which does not really get to the heart of the matter... This is causing fuzz too.
2021-01-12summary: align left, not align middleEli Schwartz4-21/+25
aligning along the left is, I think, what most projects want to do. Aligning along the middle looks subjectively ugly, and objectively prevents me from further indenting an element, e.g. Build information: prefix : /usr sysconfdir : /etc conf file : /etc/myprogram.conf
2021-01-12gen_data.py: sort files when generating mesondataEli Schwartz2-112/+112
The current way this works is chaos since the tool might return files in any order and thus shuffle around the order of embedded files. This results in big diffs that cannot be easily reviewed. Also regenerate the data according to the, going forward, canonical ordering algorithm.
2021-01-12dependencies: use env.machines for is_$os methodsDylan Baker1-7/+7
Currently we use the mesonlib ones, but these are always the build machine definitions, rather than being available for either the build or host machine. We already have an `Environment` instance, and the correct `MachineChoice`, so lets use that. Fixes #8165
2021-01-12Allow '//' as project function id due to git bash path conversion.Luke Elliott8-6/+49
See https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path