commit 1015047dbd471e4c0b9d09da8490b97b9b825c1b
parent bbdcf56518c55e2793c1bc4742c246b942f43976
Author: Valentin Gosu <valentin.gosu@gmail.com>
Date: Fri, 24 Oct 2025 13:07:04 +0000
Bug 1995925 - Make gtests use env from mach r=ahal
Otherwise winsock initialization might fail.
This has the additional benefit it allows passing MOZ_LOG
to gtest runs.
Differential Revision: https://phabricator.services.mozilla.com/D269711
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
@@ -1097,7 +1097,8 @@ def gtest(
# Use GTest environment variable to control test execution
# For details see:
# https://google.github.io/googletest/advanced.html#running-test-programs-advanced-options
- gtest_env = {"GTEST_FILTER": gtest_filter}
+ gtest_env = dict(os.environ)
+ gtest_env["GTEST_FILTER"] = gtest_filter
# Note: we must normalize the path here so that gtest on Windows sees
# a MOZ_GMP_PATH which has only Windows dir seperators, because