aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-05Fix last mention of Python 3.5. [skip ci]verfixJussi Pakkanen1-49/+56
2021-01-04fix: llvm toolset is "ClangCL" in VS2019.Luke Elliott1-1/+1
2021-01-04unit:cpp17: make C++17 test stricter checkMichael Hirsch1-5/+27
many compilers allowed "nodiscard" C++17 feature with pre-c++17 flags. The C++17 filesystem typically actually does require -std=c++17. This makes this unit test more representative of C++17 flag support.
2021-01-04Merge pull request #8080 from dcbaker/submit/option-key-typeJussi Pakkanen54-1082/+1341
Use an object for option keys
2021-01-04mintro: fix mypy warningDylan Baker1-4/+4
The output of list_targets is a pretty horrific jumble of things. We really need a TypeDict to make this not so terrible we can't deal with it, so for now just use Any.
2021-01-04fix LGTM warningsDylan Baker5-9/+8
2021-01-04Use a single coredata dictionary for optionsDylan Baker33-357/+322
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker32-431/+444
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2021-01-04move OptionKey to mesonlibDylan Baker19-238/+240
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker26-317/+382
2021-01-04cmake: fix missing languages from CMake (fixes #8132)Daniel Mensinger9-8/+80
2021-01-04Add choices to OptionProxyDylan Baker4-25/+26
they're probably not strictly needed, but it makes mypy happy.
2021-01-04use new optionkey.is_* methodsDylan Baker3-3/+3
2021-01-04coredata: Add a type to the OptionKeyDylan Baker1-18/+43
This is useful for figuring out what kind of option this is. My hope is that in the longterm this is less useful, but we'll still want it for the configuration summary printing.
2021-01-04use OptionKey for backend_optionsDylan Baker6-21/+20
2021-01-04use OptionKey for coredata.user_optionsDylan Baker7-22/+39
2021-01-04movve insert_build_prefix to mconfDylan Baker2-9/+8
that's the only place it's used anyway.
2021-01-04use the OptionKey type for command line and machine filesDylan Baker6-124/+111
2021-01-04coredata: Add OptionKey typeDylan Baker1-0/+169
This is a complex key that can store multiple bits of data in a single place. It can be generated from a command line formatted string, and it's str method returns it to that form. It's intentionally immutable, use the evolve() method to create variations of an existing key.
2021-01-04run_unittests: Add fatal-warnings to test_command_lineDylan Baker1-8/+9
Otherwise bugs like "option c_args is unknown" can slip through. that's bad.
2021-01-04run_unittests: make another test inprocess safeDylan Baker1-2/+6
2021-01-04run_unittests: Make test_command_line safe witn inprocessDylan Baker1-14/+27
This is pretty important to be able to debug the test, as it's huge and really should be a test split into subtests.
2021-01-03doc: restore accidentally removed images used in Getting-meson.md [skip ci]Eli Schwartz3-0/+0
Broken in commit 8a11cf357eaae46fd7efbb9993c0bb00e9529a13 Fixes #8148
2020-12-30Handle uppercase dependency names in wraps.Jussi Pakkanen6-2/+35
2020-12-29cmake: fix -framework dependencies (fixes #8045)Daniel Mensinger3-0/+33
2020-12-29Only do module scanning if C++ version is latest.Jussi Pakkanen1-0/+2
2020-12-29Implement support of dlang -makedeps switch (#8119)Remi Thebault2-3/+32
* Implement support of dlang -makedeps switch Fix #8118 * resolve code review comments
2020-12-28Fix network path output in ninja backend on WindowsSamuel Longchamps1-0/+7
2020-12-28Incorrect source-build directory error when using network paths on WindowsSamuel Longchamps1-2/+5
2020-12-28Merge pull request #8001 from bonzini/mtest-asyncioJussi Pakkanen2-179/+368
mtest: refactor logging and add progress report
2020-12-28Fix missed imports in #7902wereii1-0/+3
2020-12-27mtest: flush progress report before warningPaolo Bonzini1-4/+14
2020-12-27mtest: flush stdout after printing test resultsPaolo Bonzini1-1/+1
Flush after each output line, even if printing to a file, so that each result is immediately visible down a pipeline. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: add progress reportPaolo Bonzini2-1/+116
Add a progress report in the style of "yum". Every second the report prints a different test among the ones that are running. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: merge print_stats and process_test_resultPaolo Bonzini1-7/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: convert console output to TestLoggerPaolo Bonzini1-26/+26
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: convert logfile to TestLoggerPaolo Bonzini1-35/+33
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: convert jsonlogfile to TestLoggerPaolo Bonzini1-20/+27
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: introduce TestLoggerPaolo Bonzini1-10/+28
The TestLogger class lets us move the code for all those log files out of TestHarness. The interface is based on JunitBuilder, which is converted already in this commit. Over the next commits, we will also convert JSON, text and console output. The main difference with JunitBuilder is that the completion method is asynchronous. This can be useful if the logger needs to clean up after itself and wait for asyncio tasks. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: do not use __del__Paolo Bonzini1-8/+8
Use try/finally instead of destructors to ensure that log files are closed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: remove collected_logsPaolo Bonzini1-25/+33
Just reuse the collected_failures collection now that it contains TestRun objects. Move the code to generate the short form of the log to TestRun. Note that the first line of the error log is not included in get_log()'s return value, so the magic "first four lines are passed unscathed" is changed to three lines only. The resulting output is like this: --- command --- <command line> --- Listing only the last 100 lines from a long log. --- --- stdout --- ... Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: use backslash replace when printing error logsPaolo Bonzini1-1/+1
If there's an UnicodeEncodeError while printing the error logs, TestHarness tries an encode/decode pair to get rid of anything that is not a 7-bit ASCII character; this however results in "?" characters that are not very clear. To make it easier to understand what is going on, use backslashreplace instead. While at it, fix the decode to use a matching encoding. This will only matter in the rare case of sys.stdout.encoding not being an ASCII superset, but that should not matter. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: improve colorizationPaolo Bonzini1-10/+14
Instead of colorizing the whole status line, only colorize the word representing the outcome of the test (SKIP, OK, FAIL, etc.). This is less intrusive, so the patch also does the following changes: - colorize OK and EXPECTEDFAIL, respectively as green and yellow - colorize the summary of failures as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: store TestRuns in collected_failuresPaolo Bonzini1-13/+24
Instead of storing the string, store the whole TestRun. In the next patches we'll use this to colorize the summary of failures, and to allow a few more simplifications. There is some code duplication between the console and logfile code, but it won't matter as soon as console and logfile output will be in two completely separate classes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: add test methods to TestResultPaolo Bonzini1-7/+11
Keep the list of "ok" and "bad" statuses close to the definition of the enum. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: move test_count and name_max_len to TestHarness classPaolo Bonzini1-9/+10
Avoid passing them around as parameters; this will be useful when logging is moved out of TestHarness, because individual loggers will call back into TestHarness to do common formatting chores. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: add name and number to TestRunPaolo Bonzini1-23/+33
Place in TestRun everything that is needed in order to format the result. This avoids passing around the number and visible test name as arguments. Test numbers are assigned the first time they are used. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27mtest: create TestRun object early onPaolo Bonzini1-47/+52
This will provide a way to pass more information from the TestHarness local variables to the SingleTestRunner and use them outside the run_test function. For example, the name could be used to report progress while the tests are running. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-25Extend the C++ module scanner to handle Fortran, too.Jussi Pakkanen2-54/+177
2020-12-22mdist: Print file path at the end of run() instead of in create_hash().Aman Verma1-1/+1