Index: tools/testrunner/local/commands.py |
diff --git a/tools/testrunner/local/commands.py b/tools/testrunner/local/commands.py |
index 94b892c34e1997d31f2529a136c1202fbb66658c..b2dc74e4d4908376040cf6d6e3e68add942ce59d 100644 |
--- a/tools/testrunner/local/commands.py |
+++ b/tools/testrunner/local/commands.py |
@@ -50,7 +50,7 @@ def Win32SetErrorMode(mode): |
return prev_error_mode |
-def RunProcess(verbose, timeout, args, **rest): |
+def RunProcess(verbose, timeout, args, additional_env, **rest): |
if verbose: print "#", " ".join(args) |
popen_args = args |
prev_error_mode = SEM_INVALID_VALUE |
@@ -64,6 +64,7 @@ def RunProcess(verbose, timeout, args, **rest): |
Win32SetErrorMode(error_mode | prev_error_mode) |
env = os.environ.copy() |
+ env.update(additional_env) |
# GTest shard information is read by the V8 tests runner. Make sure it |
# doesn't leak into the execution of gtests we're wrapping. Those might |
# otherwise apply a second level of sharding and as a result skip tests. |
@@ -126,6 +127,6 @@ def RunProcess(verbose, timeout, args, **rest): |
) |
-def Execute(args, verbose=False, timeout=None): |
+def Execute(args, verbose=False, timeout=None, env=None): |
args = [ c for c in args if c != "" ] |
- return RunProcess(verbose, timeout, args=args) |
+ return RunProcess(verbose, timeout, args, env or {}) |