From 3f5974d8cc27a6807c714809e9c6608d55ea155b Mon Sep 17 00:00:00 2001 From: William Toohey Date: Fri, 10 Dec 2021 11:56:52 +1000 Subject: [PATCH] Activate VS env when running `meson test` --- mesonbuild/mtest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 09a862da2..ab6bdd142 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -44,7 +44,7 @@ from . import mlog from .coredata import major_versions_differ, MesonVersionMismatchException from .coredata import version as coredata_version from .mesonlib import (MesonException, OrderedSet, RealPathAction, - get_wine_shortpath, join_args, split_args) + get_wine_shortpath, join_args, split_args, setup_vsenv) from .mintro import get_infodir, load_info_file from .programs import ExternalProgram from .backend.backends import TestProtocol, TestSerialisation @@ -2001,6 +2001,9 @@ def run(options: argparse.Namespace) -> int: print(f'Could not find requested program: {check_bin!r}') return 1 + b = build.load(options.wd) + setup_vsenv(b.need_vsenv) + with TestHarness(options) as th: try: if options.list: