aboutsummaryrefslogtreecommitdiff
path: root/unittests
AgeCommit message (Collapse)AuthorFilesLines
2021-08-30environment: correctly handle cpu value aarch64_beDylan Baker1-0/+4
Fixes #9191
2021-08-30environment: add ppc -> ppc64 for aix to detect_cpuDylan Baker1-1/+1
This seems like an oversight, that we'd replace ppc with ppc64 on AIX for the cpu_family, but not for the specific cpu.
2021-08-30unittests: add tests for detect_cpuDylan Baker1-0/+35
Same thing, but for the more specific cases
2021-08-30unittests: Add a test case for detect_cpu_familyDylan Baker1-0/+56
This should help prevent regressions.
2021-08-27interpreter: fix cases of `KwargInfo(..., T, default=None)`Dylan Baker1-7/+8
The correct way to mark these is `KwargInfo(..., (T, type(None)))`. There's also a few cases of `(T, None)` which is invalid, as `None` isn't a type
2021-08-27interpreter: Add a helper for checking constrained inputsDylan Baker1-1/+2
This is quite valuable for enum-like inputs, where only a certain set of values is allowed.
2021-08-23interpreter: Fix dependency(..., static: true) fallbackXavier Claessens1-0/+5
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-20unittests: Ensure that symlink is removed after tests completeDylan Baker1-3/+7
using `TestCase.addCleanup` is both neat and tidy, and also ensures that the cleanup will be done, even if the test fails.
2021-08-17Add install tagsXavier Claessens1-9/+116
Fixes: #7007.
2021-08-16interpreter/compiler: Add type checking for the Compiler objectDylan Baker1-7/+2
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-16unittests/base: Allow init method to failDylan Baker1-11/+29
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-16unittests/base: Move code out of the try block of a try/except statementDylan Baker1-15/+18
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-16unittests/baseplatform: don't double print on errorDylan Baker1-2/+4
2021-08-15editorconfig: add setting to trim trailing whitespaceEli Schwartz12-18/+5
and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
2021-08-15run_unittests: fix unused variable warningsEli Schwartz1-2/+2
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-15Revert "compilers/c++: Add MSVC option to make the __cplusplus define accurate"Jussi Pakkanen1-0/+1
This reverts commit 0b97d585480e973d8b149618901f7a4ddfa1a906.
2021-08-11compilers/c++: Add MSVC option to make the __cplusplus define accurateDylan Baker1-1/+0
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-09interpreter: Fix missing subsubproject summary when subproject failsXavier Claessens1-0/+5
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-09pkg-config: support for `-l:libfoo.a`lilinzhe1-0/+43
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-07Fix --force-fallack-for with --wrap-mode=nofallbackXavier Claessens1-0/+6
Fixes: #9065
2021-08-04Escape path in exclude filter passed to gcovrAlois Wohlschlager1-0/+20
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-04destdir: Allow relative to build directoryXavier Claessens1-0/+6
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-07-30interenaltests: Add some version strings with ansi escapes in themDylan Baker1-0/+11
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-26Split run_unittests.py fileXavier Claessens15-0/+10715