Commit Graph

10478 Commits

Author SHA1 Message Date
Jussi Pakkanen add502c648 Disable failing Cygwin GIR test. 2021-02-18 02:14:07 +02:00
Miro Hrončok 756ea32e06 Don't access other enum members from self
This is deprecated in Python 3.10.
Instead, acces them from the class.

Fixes https://github.com/mesonbuild/meson/issues/8318
2021-02-18 00:08:44 +02:00
Xavier Claessens a5b33db558 ci: Fix failure in unit tests with vs backend 2021-02-17 22:59:54 +02:00
Paolo Bonzini 92134bac8d unittests: expect mtest logs to be utf-8 2021-02-17 21:14:05 +02:00
Paolo Bonzini 2b48d75c7e mtest: use / as path separator for ninja targets
os.path.relpath(f, wd) returns path with \ seperator on Windows, but ninja
targets always uses / separator.

See for example https://gitlab.freedesktop.org/ocrete/libnice/-/jobs/7348274.

Analyzed-by: Xavier Claessens <xavier.claessens@collabora.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-17 12:10:05 -05:00
Dylan Baker 6c1467db27 compilers: Only insert -flto-jobs in clang's link arguments
Clang has a hand `-Wunused-command-line-argument` switch, which when
turned to an error, gets very grump about `-flto-jobs=0` being set in
the compiler arguments (although `-flto=` belongs there). We'll refactor
a bit to put that only in the link arguments.

GCC doesn't have this probably because, a) it doesn't have an equivalent
warning, and b) it uses `-flto=<$numthreads.

Fixes: #8347
2021-02-17 18:06:52 +02:00
Dylan Baker 867963f131 Do not validate options when finding non-matching
This is a) useless because it's only used to print which options are not
default, and b) harmful because it can result in cases where things
break, like in projects that set a standard that the chosen compiler
doesn't support, but the project (or some subset) can be built with a
different standard.

Fixes: #8360
2021-02-17 14:51:26 +02:00
Xavier Claessens b6804bf49c Substitute @CURRENT_SOURCE_DIR@ in run_target() and custom_target()
run_target() does some variable substitutions since 0.57.0. This is a
new behavior, and undocumented, caused by sharing more code with
custom_target(). More consistency is better, so document it now.

custom_target() was doing variable substitution in the past, because it
shared some code with generator(), but that was undocumented. Some
refactoring in 0.57.0 caused it to not replace @CURRENT_SOURCE_DIR@,
@SOURCE_DIR@, and @BUILD_DIR@ anymore. This patch adds back
@CURRENT_SOURCE_DIR@ and document it. It does not add back @SOURCE_DIR@
because it is duplicate with @SOURCE_ROOT@ that has a better name. Also
do not add back @BUILD_DIR@ which is duplicate of @PRIVATE_DIR@, and
not @BUILD_ROOT@ surprisingly, adding to the confusion.
2021-02-17 14:48:04 +02:00
Dylan Baker d5238baa45 mconf: only print correct options in the correct sections
A predicate in two comprehensions was dropped, in what looks like a
rebase error on my part. With the predicate added things work correctly.

Fixes: #8344
2021-02-17 14:46:48 +02:00
Dylan Baker 10d94a12b8 Environment: Fix passing envrionment variables CPPFLAGS and CFLAGS
Or other language flags that use CPPFLAGS (like CXXFLAGS). The problem
here is actually rather simple, `dict.setdefault()` doesn't work like I
thought it did, I thought it created a weak entry, but it actually is
equivalent to:
```python
if k not in dict:
    dict[k] = v
```
Instead we'll use an intermediate dictionary (a default dictionary
actually, since that makes things a little cleaner) and then add the
keys from that dict to self.options as applicable.

Test case written by Jussi, Fix by Dylan

Co-authored-by: Jussi Pakkanen
Fixes: #8361
Fixes: #8345
2021-02-17 14:46:15 +02:00
Dylan Baker 7812ceec5f
Merge pull request #8355 from obilaniu/cudafixes
CUDA Compiler Fixes
2021-02-16 16:51:51 -08:00
Olexa Bilaniuk 3410465178 Small patch to unittests to initialize CUDA compiler correctly.
Suggested by Dylan Baker.
2021-02-16 17:01:24 -05:00
Olexa Bilaniuk d1e945f442 Add optional -Dcuda_ccbindir= option and -ccbin flag to CUDA compiler.
Closes #8110.
2021-02-16 15:10:21 -05:00
Olexa Bilaniuk cc09d984f1 Armour-grade quoting to account for NVCC's -Xcompiler peculiarities. 2021-02-16 15:10:11 -05:00
Olexa Bilaniuk 3669be30aa Extensive rewrite of GCC/MVSC flag translation to NVCC flags. 2021-02-16 15:00:31 -05:00
Olexa Bilaniuk a2530373c7 Add default debug flags for two configurations to NVCC. 2021-02-16 14:46:17 -05:00
Olexa Bilaniuk 8b784e7008 CUDA Toolkit 11.2.1 has been released, update version table
Strangely, the minimum version of CUDA Toolkit 11.2.0 has also been
updated - downwards. We pick up this change as well.
2021-02-16 14:46:17 -05:00
Jussi Pakkanen f3727c62c6 Fix VS C++ module support. 2021-02-16 17:05:12 +00:00
Xℹ Ruoyao 3ed30cea6e Fix destdir detection for installation via polkit
In 0.57.0 installation via polkit won't work anymore. `destdir` is
defaulted to an empty string ('') instead of None.  But polkit
installation code incorrectly tests `destdir is None`.
2021-02-16 08:39:29 -05:00
Jussi Pakkanen 110457543d Add missing apostrophes. [skip ci] 2021-02-16 01:04:20 +02:00
Sam Thursfield f5bc0f33da
docs: Fix typo in release notes [skip ci]
Mismatched \` symbol was messing up the formatting.
2021-02-14 23:04:15 +02:00
Jussi Pakkanen 7d1b11d67b Add a release note entry for C++ modules which was missing. [skip ci] 2021-02-14 22:12:18 +02:00
Jussi Pakkanen ba99181ba7 Bump version for new development. 2021-02-14 21:57:29 +02:00
Jussi Pakkanen 5d651e76b5 Set up release 0.57. 2021-02-14 21:28:44 +02:00
Peter Harris c0b448d3ca aix: avoid -bsvr4 flag
The svr4 linker flag causes issues, especially when compiling c++.
Replace '-z' options with the equivalent non-svr4 flags. When using
-blibpath, we must be careful to include the default system library
path, or the resulting executables will not be able to find libc.

This patch was suggested by @andreaskem in #7581.
2021-02-14 09:16:08 -08:00
Jussi Pakkanen 6a75d6c233 Add custom entyr to cuda buildtype dict. Closes #8336. 2021-02-14 18:41:07 +02:00
Jussi Pakkanen 5f697358f0
Merge pull request #8322 from bonzini/mtest-fixes
mtest fixes for 0.57
2021-02-11 17:32:45 +02:00
Paolo Bonzini b1efd03619 mtest: include classname in <testcase> JUnit element
It looks like GitLab ignores the suite name and actually uses
the classname.  Adjust the output accordingly.

Fixes: #8316
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-10 15:01:57 +01:00
Paolo Bonzini 6c40b134df mtest: cancel stdout/stderr tasks on timeout
Avoid that the tasks linger and SingleTestRunner.run() never terminates.

In order to do this, we need read_decode() and read_decode_lines() to be
cancellable, and to handle the CancelledError gracefully while returning
the output they have collected so far.

For read_decode(), this means always operating on a line-by-line basis,
even if console_mode is not ConsoleUser.STDOUT.  For read_decode_lines(),
instead, we cannot return an iterator.  Rather, read_decode_lines()
returns the output directly (similar to read_decode) and communication
with the parser is mediated by an asyncio.Queue.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-10 12:01:55 +01:00
Paolo Bonzini c6b135c1f9 mtest: clean up conditions on whether tests are run in parallel
This makes non-parallel tests emit their output on the fly,
similar to ninja console jobs.  It also cleans up the code
a bit, avoiding the repetition of "self.options.num_processes"
tests.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-10 10:58:21 +01:00
Paolo Bonzini 711d9feb4e mtest: fix nits in printing test stdout
- Ensure the output is terminated with a \n even if the test does not
  include one.

- Ensure that stdout is flushed for each reported result

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-10 10:57:55 +01:00
Paolo Bonzini 3506d8daf2 mtest: TestSetup can have [] as an exe_wrapper
Fix "meson test --wrapper foo --setup bar", it should work just fine
if the setup does not define a wrapper.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-09 18:51:05 +01:00
Paolo Bonzini b1a9578091 mtest: run the test output parser as a task
Start the parsing of the output early; this avoids a deadlock
if the test writes to stdout but no one reads from it.  It
also reports TAP or Rust subtest results as they happen,
which was the intention all along.

While at it, use a consistent naming conventions for coroutines
vs tasks.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-09 18:50:21 +01:00
Paolo Bonzini 8b94aa578a mtest: hide infinite timeout from the progress report
Avoid printing something like "30/-1s" when tests are run without
a timeout or with --timeout-multiplier 0.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-09 18:42:26 +01:00
Xavier Claessens 2a8d6690f7 backends: Fix custom_target() with configure_file() exe 2021-02-09 19:32:20 +02:00
Xavier Claessens a155935d24 backends: Always use the command returned by as_meson_exe_cmdline()
Even if the command is not wrapped by meson, it could have been modified
to add java/mono interpreters. This fix potential inconsistency between
wrapped and unwrapped commands.
2021-02-09 19:32:20 +02:00
Jussi Pakkanen ba770d1877 Bump version numbers for rc1. 2021-02-09 01:20:19 +02:00
Jussi Pakkanen 5e3c5914b6 Add packaging dir to release tarball. 2021-02-09 01:20:19 +02:00
Jussi Pakkanen d2c39e83ba Condense test directory names in preparation for rc1. 2021-02-09 00:30:20 +02:00
Jussi Pakkanen 71784e1002 Fix exe wrapper detection for run targets. 2021-02-08 23:19:41 +02:00
Luca Weiss 398df56298 Add Qt6 module 2021-02-07 22:43:00 +02:00
Jussi Pakkanen a855bcab1c
Merge pull request #8162 from dcbaker/wip/2021-01/rust-module-bindgen
Add a wrapper to the rust module for bindgen
2021-02-07 16:57:39 +00:00
Peter Hutterer 3f8585676b Make installing non-existing subdirs a supported feature
install_subdir() with a non-existing subdir creates the directory in the
target directory. This seems like an implementation detail but is quite useful
to create new directories for e.g. configuration or plugins in the installed
locations.

git bisect says this started with 8fe8161014.
Let's add a test for it and document it to make this behavior official.

Limitation: it can only create at the install_dir location, trying to create
nested subdirectories does not work and indeed creates the wrong directory
structure. That is a bug that should be fixed separately:

        install_subdir('blah',
                        install_dir: get_option('prefix'))
        install_subdir('sub/foobar',
                        install_dir: get_option('prefix'))
        install_subdir('foo/baz',
                        install_dir: get_option('prefix'))

        $ tree ../_inst
        ../_inst
        ├── baz
        ├── blah
        └── foobar

Fixes #2904
2021-02-07 12:38:31 +00:00
Jussi Pakkanen 034b81a09f
Merge pull request #8288 from bonzini/test-setup-exclude-suites
introduce add_test_setup(exclude suites: ...) keyword argument
2021-02-07 12:03:10 +00:00
Jussi Pakkanen 8b82ffa9e4
Merge pull request #8305 from xclaesse/run-target-env
run_target: Add env kwarg
2021-02-07 11:46:41 +00:00
Dylan Baker 9cebd29da9 mesonlib: Add better errormessage to typelistify 2021-02-06 10:27:04 -08:00
Dylan Baker 80ec157e5e ci: Add bindgen to CI images 2021-02-06 10:27:04 -08:00
Dylan Baker b28235428d rust: Add a module wrapper for bindgen
This has a couple of advantages over rolling it by hand:
1. it correctly handles include_directories objects, which is always
   handy
2. it correctly generates a depfile for you, which makes it more
   reliable
3. it requires less typing
2021-02-06 10:27:04 -08:00
Dylan Baker 9d441d26d2 interpreter: Add annotations for CustomTargetHolder
needed in the rust module
2021-02-06 10:27:04 -08:00
Dylan Baker 6a568fa9ad build: Add type annotations for CustomTarget constructor
which are needed in the rust module for bindgen support.
2021-02-06 10:27:04 -08:00