tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit d1a949bf3d7bc8c901d14f298c6f03e4abafe7a3
parent caaba16c6d0bed687aa4eb105e4541cc1a749995
Author: Alex Franchuk <afranchuk@mozilla.com>
Date:   Fri, 24 Oct 2025 13:45:57 +0000

Bug 1994724 - Include the current environment in per-suite gtest invocations r=yjuglaret

This was the intention in bug 1973820, but it was mistakenly omitted.

Differential Revision: https://phabricator.services.mozilla.com/D269656

Diffstat:
Mpython/mozbuild/mozbuild/mach_commands.py | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py @@ -1168,7 +1168,7 @@ def gtest( processes = [] - def add_process(job_id, env, **kwargs): + def add_process(job_id, append_env, **kwargs): def log_line(line): # Prepend the job identifier to output command_context.log( @@ -1178,6 +1178,10 @@ def gtest( "[{job_id}] {line}", ) + env = os.environ.copy() + # Allow the new environment to overwrite system environment variables. + env.update(append_env) + report.set_output_in_env(env, job_id) proc = ProcessHandlerMixin( @@ -1250,7 +1254,7 @@ def gtest( for filt in suite_filters(suites): proc = add_process( filt.suite, - filt(gtest_env), + filt(gtest_env.copy()), onFinish=functools.partial(run_next, filt.suite), ) processes_to_run.append((filt.suite, proc))