diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-07-07 17:37:56 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-07-07 18:00:37 +0200 |
commit | b44a51d0fdd48089d2cc3864d34a3ccad77ec52d (patch) | |
tree | d6009b376b277b7c65b362b76beb1d12681b4510 /mesonbuild/mtest.py | |
parent | 81d9acab8744d5fbd067cfad0723975b694101f0 (diff) | |
download | meson-b44a51d0fdd48089d2cc3864d34a3ccad77ec52d.zip meson-b44a51d0fdd48089d2cc3864d34a3ccad77ec52d.tar.gz meson-b44a51d0fdd48089d2cc3864d34a3ccad77ec52d.tar.bz2 |
resolve symlinks passed to -C
"meson setup" is resolving symlinks for the build directory in
validate_core_dirs. For consistency with it, do the same when
the build directory is passed via -C to devenv, dist, init, install
and test.
This ensures for example that the path to test dependencies is
computed correctly in "meson test".
Fixes: #8765
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r-- | mesonbuild/mtest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 826619f..8d002f6 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -43,7 +43,8 @@ from . import environment from . import mlog from .coredata import major_versions_differ, MesonVersionMismatchException from .coredata import version as coredata_version -from .mesonlib import MesonException, OrderedSet, get_wine_shortpath, split_args, join_args +from .mesonlib import (MesonException, OrderedSet, RealPathAction, + get_wine_shortpath, join_args, split_args) from .mintro import get_infodir, load_info_file from .programs import ExternalProgram from .backend.backends import TestProtocol, TestSerialisation @@ -104,7 +105,7 @@ def add_arguments(parser: argparse.ArgumentParser) -> None: help='List available tests.') parser.add_argument('--wrapper', default=None, dest='wrapper', type=split_args, help='wrapper to run tests with (e.g. Valgrind)') - parser.add_argument('-C', default='.', dest='wd', + parser.add_argument('-C', dest='wd', action=RealPathAction, # https://github.com/python/typeshed/issues/3107 # https://github.com/python/mypy/issues/7177 type=os.path.abspath, # type: ignore |