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.
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>
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>
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>
- 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>
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>
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>
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>
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.
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
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
This allows representing functions like assert(), which take optional
positional arguments, which are not variadic. More importnatly you can
represent a function like (* means optional, but possitional):
```txt
func(str, *int, *str)
```
typed_pos_args will check that all of your types are correct, and if not
provide None, which allow simplifying a number of implementation details
We don't do a very good job of type checking in the interpreter,
sometimes we leave it to the mid layers of backends to do that (layering
violations) and sometimes we just don't check them at all. When we do
check them it's a ton of boilerplate and complicates the code. This
should help quite a bit.
Our approach to unity builds with vala is broken, you cannot unify the
generated C files, as they contain duplicate symbols. We would need to
instead combine the files while they are still in their vala form, then
convert that to C and compile the unified C file.
This does not fix the linked issue, as this removed the ability to do
vala unity builds, but it does allow running vala with `--unity=on`.
Related: #5280
Replacements are already done by eval_custom_target_command() and must
be done BEFORE calling as_meson_exe_cmdline() anyway. replace_paths() is
still used by generators.
Make eval_custom_target_command() more readable by handling error in the
final else case instead of in the middle of elif.
Re-implement it in backend using the same code path as for
custom_target(). This for example handle setting PATH on Windows when
command is an executable.
Various GNOME projects have scripts that does similar task, better do it
directly in meson. This ensures it's done correctly regarding usage of
subprojects and pkg-config. See for example this gtk bug:
https://gitlab.gnome.org/GNOME/gtk/-/issues/3626.
Fixes: #8268