Commit Graph

10207 Commits

Author SHA1 Message Date
Daniel Mensinger 5cbc8f866c cmake: fix -framework dependencies (fixes #8045) 2020-12-29 21:43:54 +00:00
Jussi Pakkanen 80390dd987 Only do module scanning if C++ version is latest. 2020-12-29 21:42:47 +00:00
Remi Thebault 7a9a9e4a99
Implement support of dlang -makedeps switch (#8119)
* Implement support of dlang -makedeps switch

Fix #8118

* resolve code review comments
2020-12-29 09:56:35 -08:00
Samuel Longchamps 12cfd10e6a Fix network path output in ninja backend on Windows 2020-12-28 22:14:48 +00:00
Samuel Longchamps e11218c153 Incorrect source-build directory error when using network paths on Windows 2020-12-28 22:14:48 +00:00
Jussi Pakkanen d4fc2dc0bc
Merge pull request #8001 from bonzini/mtest-asyncio
mtest: refactor logging and add progress report
2020-12-28 15:25:40 +00:00
wereii 3a7baef7ea Fix missed imports in #7902 2020-12-28 15:25:22 +00:00
Paolo Bonzini 5d97bf615f mtest: flush progress report before warning 2020-12-27 13:55:53 +01:00
Paolo Bonzini 80ba696066 mtest: flush stdout after printing test results
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-27 13:55:53 +01:00
Paolo Bonzini 4cfd1e638c mtest: add progress report
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-27 13:55:52 +01:00
Paolo Bonzini aa03c06ffb mtest: merge print_stats and process_test_result
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27 13:55:33 +01:00
Paolo Bonzini df0d5ce34e mtest: convert console output to TestLogger
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27 13:55:33 +01:00
Paolo Bonzini 240036bced mtest: convert logfile to TestLogger
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27 13:55:33 +01:00
Paolo Bonzini 119a928f9f mtest: convert jsonlogfile to TestLogger
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27 13:55:33 +01:00
Paolo Bonzini fb02b5e858 mtest: introduce TestLogger
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-27 13:55:33 +01:00
Paolo Bonzini a166df1f96 mtest: do not use __del__
Use try/finally instead of destructors to ensure that log files are closed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-27 13:55:33 +01:00
Paolo Bonzini 109cde4ddc mtest: remove collected_logs
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-27 13:55:33 +01:00
Paolo Bonzini 414aee6328 mtest: use backslash replace when printing error logs
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-27 13:55:33 +01:00
Paolo Bonzini 2201e2bca6 mtest: improve colorization
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-27 13:55:33 +01:00
Paolo Bonzini 7b3cca5047 mtest: store TestRuns in collected_failures
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-27 13:55:33 +01:00
Paolo Bonzini eadbf3dbf5 mtest: add test methods to TestResult
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-27 13:55:33 +01:00
Paolo Bonzini 9d29bd0225 mtest: move test_count and name_max_len to TestHarness class
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-27 13:55:30 +01:00
Paolo Bonzini 3f8c901245 mtest: add name and number to TestRun
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-27 13:55:02 +01:00
Paolo Bonzini 30741a0f20 mtest: create TestRun object early on
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-27 13:55:02 +01:00
Jussi Pakkanen 2f836e3acc Extend the C++ module scanner to handle Fortran, too. 2020-12-25 23:28:42 +00:00
Aman Verma cb10ba75d4 mdist: Print file path at the end of run() instead of in create_hash(). 2020-12-22 21:38:28 -05:00
Aman Verma 1f7c8ec7e2 mdist: Ensure correct format for sha256sum.
We conform to the format described at
<https://www.gnu.org/software/coreutils/manual/html_node/md5sum-invocation.html>.
and compatible with busybox and Perl's shasum utility.
2020-12-22 21:38:28 -05:00
Alan Coopersmith d6ef5b2024 depfixer: split new rpath into multiple entries for dedup comparisons
Fixes: #8115

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-12-22 20:21:31 +00:00
Alan Coopersmith fdfc239cda linkers: add rpath_dirs_to_remove support to SolarisDynamicLinker
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>
2020-12-22 20:21:31 +00:00
Jussi Pakkanen 8a11cf357e Add simple start page for beginners. [skip ci] 2020-12-22 18:08:47 +00:00
Eli Schwartz 55a3458d7b
Revert "add owl chess in Users.md [skip ci]"
This reverts commit 7092efabb5.

No longer exists. See:
https://github.com/mesonbuild/meson/pull/7592#issuecomment-747817950
2020-12-17 21:06:34 -05:00
Persian Prince f5871f434a
environment.py: Detect all mips* architectures (#8108)
* 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
2020-12-17 10:37:39 -08:00
Daniel Mensinger 5c821edf26 cmake: Revert to using self.for_machine instead of MachineChoice.BUILD (fixes #8028) 2020-12-16 21:50:27 +00:00
Jussi Pakkanen c415bc6cfb
Merge pull request #8103 from dcbaker/submit/module-typing-cleanups
Fix some layering violations and add some type annotations in the interpreter
2020-12-16 21:49:38 +00:00
Dylan Baker a9ff308d27 mlog: make mlog helper take once keyword argument
We really want to have this in the log method as well.

Fixes: #8002
2020-12-16 21:15:09 +00:00
Dylan Baker 7ddb7a48f5 build/interpreter: Add some type annotations 2020-12-16 12:29:49 -08:00
Dylan Baker 5bdc623696 interpreter: Use a typing.NamedTuple instead of collections.namedtuple
The former can hold type annotations, unlike the other. It also uses the
class syntax, which is easier to read.
2020-12-16 12:29:49 -08:00
Dylan Baker 47c560f3f7 build: Use python 3.6 annotation syntax for Build initializer 2020-12-16 12:29:49 -08:00
Dylan Baker 2f66d9f2eb build: Add annotation for Build.data 2020-12-16 12:23:23 -08:00
Dylan Baker 94b9e7b04e build/interpreter: fix layering violations for ManPages
Like `install_headers`, `install_man` used the same objects for both the
interpreter and the build, this is bad. Let's have two separate objects.
2020-12-16 12:23:23 -08:00
Dylan Baker 7ffc678514 build/interpreter: split representation of Headers
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`.
2020-12-16 12:23:23 -08:00
Jussi Pakkanen d32d0d6b53
Merge pull request #7902 from bonzini/mtest-build-depends-only
mtest: only build what is needed for the tests
2020-12-15 21:21:50 +00:00
Martin Storsjö c9685ac561 Fix the subsystem options for lld in mingw mode
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.
2020-12-15 11:46:17 -08:00
Jean-Michel Gorius 521a1b9921 docs: Update link to libspng [skip ci]
libspng moved from Gitlab to Github. Update the link to point to the new location.
2020-12-15 17:49:05 +00:00
Eli Schwartz 9a42779521
doc: fix typos for doubled words [skip ci]
"more more" is one place where we don't need more.

Fixes #8097
2020-12-14 21:24:34 -05:00
Laurin-Luis Lehning b9b2e0223e Less restrictive get_win_subsystem_args implementations 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning 4164efceca Propagate Windows target checks up 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning 919278e3e1 Give get_gui_app_args access to the Environment 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning 4053babf9c Slight consistency changes to get_gui_app_args 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning 76b577af11 Oversight in VisualStudioLikeLinkerMixin 2020-12-14 11:23:53 -08:00