Commit Graph

18 Commits

Author SHA1 Message Date
Xavier Claessens e646130ef1 interpreter: Fix dependency(..., static: true) fallback
It should build the fallback subprject with default_library=static and
override the dependency for both static=True and static kwarg not given.

Fixes: #8050.
2021-08-23 10:52:18 -04:00
Dylan Baker e0ab7290f0 unittests: Ensure that symlink is removed after tests complete
using `TestCase.addCleanup` is both neat and tidy, and also ensures that
the cleanup will be done, even if the test fails.
2021-08-20 21:22:55 +03:00
Xavier Claessens 8c5aa031b5 Add install tags
Fixes: #7007.
2021-08-17 15:19:18 -04:00
Dylan Baker b30dddd4e5 interpreter/compiler: Add type checking for the Compiler object
This adds a full set of `typed_pos_args` and `typed_kwarg` decorations,
as well as fixing all of the typing errors reported by mypy.
2021-08-16 16:21:51 -07:00
Dylan Baker 5fe03cf8d9 unittests/base: Allow init method to fail
This adds a new keyword argument to the init method, `allow_fail`. When
set to True (default is False) then a failure to configure is not an
error, and output is still returned. This can be useful for cases where
we expect initialization to fail, and want to check the output.
2021-08-16 16:21:51 -07:00
Dylan Baker 310d7d13f4 unittests/base: Move code out of the try block of a try/except statement
There are two problems with having this in the try/except block. The
first is that both of the if statements will raise, and the except
statement cathces `Exception`, so it catches these two cases, prints a
message that we either don't want or already printed, then re-raises.
2021-08-16 16:21:51 -07:00
Dylan Baker 7daed5faf8 unittests/baseplatform: don't double print on error 2021-08-16 16:21:51 -07:00
Eli Schwartz 59d4f771d2
editorconfig: add setting to trim trailing whitespace
and clean up all outstanding issues

Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
2021-08-15 09:36:18 -04:00
Eli Schwartz ead4ba7777
run_unittests: fix unused variable warnings
We don't actually want to do anything with the open()ed file, just
immediately close it.

The CalledProcessError doesn't have its return returncode checked
here, even though other code with the same type of context manager does.
2021-08-15 09:36:18 -04:00
Jussi Pakkanen a90d2925dd Revert "compilers/c++: Add MSVC option to make the __cplusplus define accurate"
This reverts commit 0b97d58548.
2021-08-15 13:18:35 +03:00
Dylan Baker 0b97d58548 compilers/c++: Add MSVC option to make the __cplusplus define accurate
Otherwise it always returns the value for c++98, starting with MSVC 2017
15.7 or later. Earlier versions are not affected by this mis-feature
2021-08-11 21:54:16 +03:00
Xavier Claessens 5462ea921f interpreter: Fix missing subsubproject summary when subproject fails
In the case main->subp->subsubp, if subsubp succeed to configure but
subp subsequentially fails, subsubp is still being built but its summary
was missing.
2021-08-09 14:11:42 -04:00
lilinzhe dd2e3bf446 pkg-config: support for `-l:libfoo.a`
fixs: #9000 Meson not correctly process with -l:xxx.a link arguments in pkgconfig .pc file.

see also:https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a

with unit test, unit test will be partially skiped if pkg-config version < 0.28 .
    see: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/blob/master/NEWS
2021-08-09 19:32:48 +02:00
Xavier Claessens 943596abbb Fix --force-fallack-for with --wrap-mode=nofallback
Fixes: #9065
2021-08-07 11:20:57 +02:00
Alois Wohlschlager 40d5a38d1b Escape path in exclude filter passed to gcovr
Gcovr interprets exclude filters, as passed to the -e option, as
regexes. Since we want to exclude a raw path, the argument must be
escaped.
2021-08-04 20:31:35 +02:00
Xavier Claessens 9da99e7a59 destdir: Allow relative to build directory
Meson already works like that, except in do_copydir() that requires
absolute destdir. Better explicitly support that instead of leaving it
undefined and unconsistent.
2021-08-04 09:43:41 -04:00
Dylan Baker a450f8c6bc interenaltests: Add some version strings with ansi escapes in them
AS we've run into a few programs using ansi escapes in their version
outputs, we'd like to test them as well.
2021-07-30 10:19:28 -07:00
Xavier Claessens 7eb4c23156 Split run_unittests.py file 2021-07-26 15:19:13 -04:00