Age | Commit message (Collapse) | Author | Files | Lines |
|
There is no need anymore to pass the JUnit XML down to complete_exitcode. Just
set self.junit in complete_gtest instead.
|
|
The test_env was lost from the TestRun object in commit
30741a0f2 ("mtest: create TestRun object early on"). Fix
things.
|
|
Rebase mistake in "mtest: move timeout message to ConsoleLogger".
|
|
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.
|
|
|
|
|
|
Add type annotations to minstall (and some related cleanups)
|
|
this also clears up the last of the mypy problems in minstall, yay!
|
|
Same idea as the last patch, just different data
|
|
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.
|
|
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.
|
|
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)
|
|
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.
|
|
|
|
This moves the user input validation to the interpreter, instead of
being in the build module, and adds type annotations.
|
|
This uses PEP8 style, one per from `import mod`, but with commas from
`from mod import a, b`. Also run sort, for niceness.
|
|
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.
|
|
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
See https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path
|
|
Read and store all environment variables up front
|
|
A sub-subproject can be configured directly from
`subprojects/foo/subprojects/bar/` in the case `bar` is in the same git
repository as `foo` and not downloaded separately into the main
project's `subprojects/`. In that case the nested subproject violation
code was wrong because it is allowed to have more than one "subprojects"
in path (was not possible before Meson 0.56.0).
Example:
- self.environment.source_dir = '/home/user/myproject'
- self.root_subdir = 'subprojects/foo/subprojects/bar'
- project_root = '/home/user/myproject/subprojects/foo/subprojects/bar'
- norm = '/home/user/myproject/subprojects/foo/subprojects/bar/file.c'
We want `norm` path to have `project_root` in its parents and not have
`project_root / 'subprojects'` in its parents. In that case we are sure
`file.c` is within `bar` subproject.
|
|
they're really not public methods, they'r only meant to be called from
the initializer. Let's mark them as such.
|
|
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.
|
|
This is only used in environment, so it should live there too.
|
|
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.
|
|
This means that all the env lookups are done once, at initial configure
time. This has all of the expected advantages.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
We already read this in, don't read it again. Just rely on the value we
have stored.
|
|
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.
|
|
Some change in this series causes mypy to notice that this isn't
annotated, and it makes a wrong assumption.
|
|
there are a couple of places importing it from envconfig, which is not
correct. It's defined in mesonlib, and then imported into envconfig.
|
|
|
|
The parentheses look ugly in the progress report. To keep it aligned
with the test outcomes, remove them from the outcomes as well.
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Compute all options in advance so that we can compute the maximum
timeout.
|
|
This adds a point where to call the progress report flush() method.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This will be useful when printing the progress report.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
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>
|
|
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>
|
|
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.
|
|
Make the code look like the TAP parser. This simplifies the introduction of
asynchronous parsing.
|
|
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>
|