From 34dcaefbac3502008d735692423e579323684900 Mon Sep 17 00:00:00 2001 From: tlopex <820958424@qq.com> Date: Wed, 10 Jun 2026 01:34:47 -0400 Subject: [PATCH] Fix CI script test subprocess environment --- tests/python/ci/test_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/python/ci/test_utils.py b/tests/python/ci/test_utils.py index 7354c7a50b80..9c54fcd309e7 100644 --- a/tests/python/ci/test_utils.py +++ b/tests/python/ci/test_utils.py @@ -19,6 +19,7 @@ Constants used in various CI tests """ +import os import pathlib import subprocess from typing import Any @@ -64,6 +65,9 @@ def run_script(command: list[Any], check: bool = True, **kwargs): "stderr": subprocess.PIPE, "encoding": "utf-8", } + env = kwargs.pop("env", None) + if env is not None: + kwargs_to_send["env"] = {**os.environ, **env} kwargs_to_send.update(kwargs) proc = subprocess.run( command,