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>
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>
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>
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>
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>
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>
Applies the changes made to GnuLikeDynamicLinkerMixin by
commit d7235c5905 to SolarisDynamicLinker
This makes test_build_rpath pass with the Solaris linker, where before
this change it failed with:
New rpath must not be longer than the old one.
Old: $ORIGIN/sub:/foo/bar
New: /baz:$ORIGIN/sub:/foo/bar
FAILED: meson-install
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* environment.py: Detect all mips* architectures
We have more than those values, like:
mipsel
mipsel-nf
mips32el
mips33el-nf
mipsisa32r6
mipsisa32r6el
So lets just detect them all.
Sorry I forgot about 64bit and closed https://github.com/mesonbuild/meson/pull/8106
But now it even detects:
mipsisa64r6
mipsisa64r6el
* Make dcbaker happy
This was all layering violations before. Now we have Headers in the
build module, and a holder in the interpreter. All of the type
validation is done in interpreter method for `install_headers`.
lld in gnu like mode (e.g. for mingw) needs these options in
the same for as gnu ld, thus remove the lld specific code bit
and move the code for gnu like options into GnuLikeDynamicLinkerMixin.
This unbreaks linking with lld for mingw targets after
2fb4d1f751.
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test. When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.
Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.
Fixes: #7473
Related: #7830
With the next patch, "meson test" will be using the targets introspection
information. Provide helper functions to share bits of code between
mintro.py and mtest.py.
This fix a regression introduced in Meson 0.56.0 when using python 3.5.
Also mention in documentation that using a meson dict does not guarantee
ordering.
Fixes: #8074.
Previously the destdir was ignored completely when using elevated
privileges to install files as pkexec stripped the DESTDIR environment
variable.
As the destdir is not supposed to require any special privileges
anyways, just re-raise the error.
The ninja path is already logged as part of configure. Logging it
again every time when using meson compile is overly verbose and
doesn't add much value for the user.
Otherwise it's not possible to share git subprojects via worktrees
when creating a worktree of a git repository that uses meson
subprojects.
The downside is that the user needs to be careful while adding commits
to each tree's index.
Allow methods on the compiler object to receive internal dependencies,
as long as they only specify compiler/linker arguments or other
dependencies that satisfy the same requirements.
This is useful if you're using internal dependencies to add special
"-D" flags such as -DNCURSES_WIDECHAR, -D_XOPEN_SOURCE_EXTENDED or
-DGLIB_STATIC_COMPILATION.