aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-11CI: fix arch linux tests failing to install wxgtkEli Schwartz1-1/+1
There hasn't been any such package since the original addition of a gtk3 version of wxgtk... back in 2017. The "new" wxgtk2 package provided a virtual provides ever since, so people still depending on "wxgtk" would get the old gtk2 version. This virtual provides got dropped today, resulting in the package being uninstallable. Resolve the provides to its canonical name, thus making it installable again.
2021-01-11make some Environment methods protectedDylan Baker1-5/+5
they're really not public methods, they'r only meant to be called from the initializer. Let's mark them as such.
2021-01-11clean up get_env_var_pairDylan Baker1-14/+8
This function returns both the name and the value, but we never actually use the name, just the value. Also make this module private. We really want to keep all environment variable reading in the Environment class so it's done once up front. This should help with that goal.
2021-01-11move get_env_var_pair to environmentDylan Baker2-38/+32
This is only used in environment, so it should live there too.
2021-01-11boost: default machine file properties to env var valuesDylan Baker4-59/+37
This both moves the env reading to configuration time, which is useful, and also simplifies the implementation of the boost dependency. The simplification comes from being able to delete basically duplicated code since the values will be in the Properties if they exist at all.
2021-01-11Move BinaryTable environment lookups to EnvironmentDylan Baker3-65/+57
This means that all the env lookups are done once, at initial configure time. This has all of the expected advantages.
2021-01-11pull env to program mappings out of BinaryType classDylan Baker2-49/+49
These really aren't pivotal to that class, and they're used outside of it. In a follow up patch they're not going to be used inside it at all.
2021-01-11move handling of CFLAGS and friends to environmentDylan Baker6-111/+72
This has a bunch of nice features. It obviously centralizes everything, which is nice. It also means that env is only re-read at `meson --wipe`, not `meson --reconfigure`. And it's going to allow more cleanups.
2021-01-11use PEP8 style naming for LANGUAGES_USING_* as wellDylan Baker3-7/+7
2021-01-11rename cflags_mapping to CFLAGS_MAPPINGDylan Baker3-19/+23
This is PEP8 convention for a const variable. Also, make the type Mapping, which doesn't have mutation methods. This means mypy will warn us if someone tries to change this.
2021-01-11dependencies: Don't read PKG_CONFIG_PATH from the env againDylan Baker1-10/+2
We already read this in, don't read it again. Just rely on the value we have stored.
2021-01-11move CMAKE_PREFIX_PATH env var handling to environmentDylan Baker2-24/+20
This causes the variable to be read up front and stored, rather than be re-read on each invocation of meson. This does have two slight behavioral changes. First is the obvious one that changing the variable between `meson --reconfigure` invocations has no effect. This is the way PKG_CONFIG_PATH already works. The second change is that CMAKE_PREFIX_PATH the env var is no longer appended to the values set in the machine file or on the command line, and is instead replaced by them. CMAKE_PREFIX_PATH is the only env var in meson that works this way, every other one is replaced not appended, so while this is a behavioral change, I also think its a bug fix.
2021-01-11dependencies/mpi: Add a type annotationDylan Baker1-1/+1
Some change in this series causes mypy to notice that this isn't annotated, and it makes a wrong assumption.
2021-01-11import MachineChoice from mesonlibDylan Baker2-2/+2
there are a couple of places importing it from envconfig, which is not correct. It's defined in mesonlib, and then imported into envconfig.
2021-01-11unittests: Clang on windows can use either ld or link.exeDylan Baker1-2/+4
it generally uses the ld style linkers with msys2 and link.exe style linkers otherwise, but anything's possible.
2021-01-11doc: fix invalid Commands.md example for introspect [skip ci]Eli Schwartz1-1/+1
It requires at least one option argument, and the one that provides "basic information" about the project is --projectinfo, so let's use that to demo the command. Fixes #8182
2021-01-11Add Chicken-Libraries to Users.md (#8180)Michael Brockus1-0/+1
2021-01-10cmake: add PATH logic to preliminary dep check (fixes #8133)Daniel Mensinger7-5/+35
2021-01-10Merge pull request #8029 from bonzini/mtest-asyncio-nextJussi Pakkanen2-330/+466
mtest: asynchronous TAP parsing, improved progress report
2021-01-10Hotdoc: use template for Commands.md instead of generating the entire file ↵Eli Schwartz4-102/+38
(#8154) * doc: fix hotdoc misuse for dynamically generated content hotdoc has a native include feature for including files inline. Use this to generate one file for each dynamically generated code block, and include that file in Commands.md; see: https://hotdoc.github.io/syntax-extensions.html#smart-file-inclusion-syntax This permits us to move back to using the in-tree version of the hotdoc *.md sources, thus fixing the incorrect inclusion of "builddir/" in the "Edit on github" links which resulted from using copies as the source. Fixes #8061 * doc: call the dummy file a "stamp" as it is a better known term
2021-01-09ci: Run github workflows on stable branches tooNirbheek Chauhan2-0/+4
2021-01-09ci: Fix pip installation in Cygwin on AzureNirbheek Chauhan1-1/+1
Python3 in Cygwin is now Python 3.8
2021-01-07mtest: print TAP subtest countPaolo Bonzini1-2/+15
The parentheses look ugly in the progress report. To keep it aligned with the test outcomes, remove them from the outcomes as well.
2021-01-07mtest: print time that the test has been runningPaolo Bonzini1-4/+18
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: align decimal point of test durationsPaolo Bonzini1-2/+9
2021-01-07mtest: create runners in advancePaolo Bonzini1-17/+24
Compute all options in advance so that we can compute the maximum timeout.
2021-01-07mtest: move timeout message to ConsoleLoggerPaolo Bonzini1-0/+4
This adds a point where to call the progress report flush() method. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: store timeout in TestRunPaolo Bonzini1-13/+13
This will be useful when printing the progress report. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: add more formatting options to TestHarness.formatPaolo Bonzini1-15/+34
Allow leaving extra space in the left column, as well as customizing parts of the printed line. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: align correctly tests with wide Unicode charactersPaolo Bonzini1-3/+13
This correctly formats tests with CJK names or, well, emoji. It is not perfect (for example it does not correctly format emoji that are variations of 1-wide characters), but it is as good as most terminal emulators. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: make test output parsing asynchronousPaolo Bonzini1-22/+34
Instead of slurping in the entire stream, build the TestResult along the way. This allows reporting the results of TAP and Rust subtests as they come in, either as part of the progress report or (in the future) as individual lines of the output.
2021-01-07mtest: move Rust parsing inside TestRunPaolo Bonzini1-41/+40
Make the code look like the TAP parser. This simplifies the introduction of asynchronous parsing.
2021-01-07mtest: read test stdout/stderr via asyncio pipesPaolo Bonzini1-21/+29
Instead of creating temporary files, get the StreamReaders from _run_subprocess's returned object. Through asyncio magic, their contents will be read as it becomes ready and then returned when the StreamReader.read future is awaited. Because of this change, the stdout and stderr can be easily preserved when TestSubprocess returns an additional_error. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: do not wait inside _run_subprocessPaolo Bonzini1-66/+81
We would like SingleTestRunner to run code before waiting on the process, for example starting tasks to read stdout and stderr. Return a new object that is able to complete _run_subprocess's task. In the next patch, SingleTestRunner will also use the object to get hold of the stdout and stderr StreamReaders. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: handle should_fail in common codePaolo Bonzini1-10/+4
This is common to all protocols, place the code in a single place.
2021-01-07mtest: reorder arguments to "complete"Paolo Bonzini1-6/+6
Put them in the same order as complete_*.
2021-01-07mtest: improve JUnit XML generation for TAP testsuitesPaolo Bonzini1-46/+52
Include the names from the TAP output and the SKIP/TODO explanations if present. Omit the classname attribute, it is optional. In order to enable this, TestRun.results becomes a list of TAPParser.Test objects. If in the future there are other kinds of subtest results a new class can be introduced, but for now it is enough. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: improvements to JUnit XML generationPaolo Bonzini1-6/+8
Omit the classname attribute, as it is optional, and add the duration. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest: extract TAP parsing out of TestRun.make_tapPaolo Bonzini1-44/+53
For now this is just a refactoring that simplifies the next patch. However, it will also come in handy when we will make the parsing asynchronous, because it will make it possible to access subtest results while the test runs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-07mtest/TAPParser: use typing.NamedTuplePaolo Bonzini2-35/+50
It is cleaner than collections.namedtuple. It also catches that "count()" is a method on tuple, so rename the field to num_tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-06mtest: remove argument to the TAPParser constructorPaolo Bonzini2-8/+5
Pass the StringIO object to the parse method instead, because there will be no T.Iterator[str] to use in the asynchronous case. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-06mtest: allow parsing TAP line by linePaolo Bonzini1-63/+68
This is the first step towards asynchronous parsing of the TAP output. We will need to call the same code from both a "for" loop (for unit tests) and an "async for" loop (for mtest itself). Because the same function cannot be both a generator and an asynchronous generator, we need to build both on a common core. This commit therefore introduces a parse_line function that "parse" can call in a loop. All the local variables of TAPParser.parse move into "self". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-06Merge pull request #7860 from dcbaker/wip/2020-10/rust-moduleJussi Pakkanen16-51/+364
Add a rust module
2021-01-05update codeowners with the rust moduleDylan Baker1-0/+1
2021-01-05modules: Add an unstable-rust moduleDylan Baker9-27/+229
Like other language specific modules this module is module for holding rust specific helpers. This commit adds a test() function, which simplifies using rust's internal unittest mechanism. Rust tests are generally placed in the same code files as they are testing, in contrast to languages like C/C++ and python which generally place the tests in separate translation units. For meson this is somewhat problematic from a repetition point of view, as the only changes are generally adding --test, and possibly some dependencies. The rustmod.test() method provides a mechanism to remove the repatition: it takes a rust target, copies it, and then addes the `--test` option, then creates a Test() target with the `rust` protocol. You can pass additional dependencies via the `dependencies` keyword. This all makes for a nice, DRY, test definition.
2021-01-05Fix last mention of Python 3.5. [skip ci]Jussi Pakkanen1-49/+56
2021-01-05interpreter: split code that creates a Test instanceDylan Baker1-5/+8
For modules to make use of, as they're not allowed to modify the Build instance directly.
2021-01-05interpreter: allow modules to create testsDylan Baker1-0/+2
2021-01-05mtest: Add support for rust unit testsDylan Baker7-2/+107
Rust has it's own built in unit test format, which is invoked by compiling a rust executable with the `--test` flag to rustc. The tests are then run by simply invoking that binary. They output a custom test format, which this patch adds parsing support for. This means that we can report each subtest in the junit we generate correctly, which should be helpful for orchestration systems like gitlab and jenkins which can parse junit XML.
2021-01-05mtest: Handle subtest results as a dictDylan Baker1-17/+17
for non tap tests we want to associate names with the tests, to that end store them as a dict. For TAP tests, we'll store the "name" as an integer string that coresponds to the order that the tests were run in.