From a2e7ebc575a47bfb3dfb774591cde3fdc6873dc9 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 14 Sep 2016 17:11:27 -0300 Subject: Add a new 'environment' object to be used to build test environment (#781) Allowing user to fine tune tests environment variables --- mesonbuild/scripts/meson_test.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mesonbuild/scripts') diff --git a/mesonbuild/scripts/meson_test.py b/mesonbuild/scripts/meson_test.py index ab21654d3..acf7cd53e 100644 --- a/mesonbuild/scripts/meson_test.py +++ b/mesonbuild/scripts/meson_test.py @@ -15,6 +15,7 @@ # limitations under the License. import mesonbuild +from .. import build import sys, os, subprocess, time, datetime, pickle, multiprocessing, json import concurrent.futures as conc import argparse @@ -128,6 +129,9 @@ def run_single_test(wrap, test): cmd = wrap + cmd + test.cmd_args starttime = time.time() child_env = os.environ.copy() + if isinstance(test.env, build.EnvironmentVariables): + test.env = test.env.get_env(child_env) + child_env.update(test.env) if len(test.extra_paths) > 0: child_env['PATH'] = child_env['PATH'] + ';'.join([''] + test.extra_paths) -- cgit v1.2.3