diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-04-30 13:30:37 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-04-30 13:30:37 -0700 |
commit | fe46515630a9ec8da23fea3f9940302815385119 (patch) | |
tree | b3801bcd4767d01e762ea6c56fe475c284fa723a /mesonbuild | |
parent | 542255993cce730b01d8bf79bf48aa8f5ad36fc9 (diff) | |
download | meson-fe46515630a9ec8da23fea3f9940302815385119.zip meson-fe46515630a9ec8da23fea3f9940302815385119.tar.gz meson-fe46515630a9ec8da23fea3f9940302815385119.tar.bz2 |
mtest: use argparse.type to simplify some code
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mtest.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index b90a65d..846b474 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -93,7 +93,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', default='.', dest='wd', type=os.path.abspath, help='directory to cd into before running') parser.add_argument('--suite', default=[], dest='include_suites', action='append', metavar='SUITE', help='Only run tests belonging to the given suite.') @@ -1160,7 +1160,6 @@ def run(options: argparse.Namespace) -> int: if not exe.found(): print('Could not find requested program: {!r}'.format(check_bin)) return 1 - options.wd = os.path.abspath(options.wd) if not options.list and not options.no_rebuild: if not rebuild_all(options.wd): |