From 5bfc3a342170f961a5474687434e57b69b5ece2d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 8 Sep 2021 19:56:07 +0200 Subject: [PATCH] Fix error running benchmark script with environment variables for builds Ref D12434 --- tests/performance/api/config.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/performance/api/config.py b/tests/performance/api/config.py index aa991e7d7d8..b5e2b390aa3 100644 --- a/tests/performance/api/config.py +++ b/tests/performance/api/config.py @@ -161,7 +161,13 @@ class TestConfig: def read_blender_executables(env, name) -> List: config = TestConfig._read_config_module(env.base_dir / name) builds = getattr(config, 'builds', {}) - return [pathlib.Path(build) for build in builds.values()] + executables = [] + + for executable in builds.values(): + executable, _ = TestConfig._split_environment_variables(executable) + executables.append(pathlib.Path(executable)) + + return executables @staticmethod def _read_config_module(base_dir: pathlib.Path) -> None: @@ -274,7 +280,8 @@ class TestConfig: return entries - def _split_environment_variables(self, revision): + @staticmethod + def _split_environment_variables(revision): if isinstance(revision, str): return revision, {} else: