Index: tools/testrunner/local/commands.py |
diff --git a/tools/testrunner/local/commands.py b/tools/testrunner/local/commands.py |
index 94b892c34e1997d31f2529a136c1202fbb66658c..596bae6a2f919b9687730ad66376769cbf6a2eae 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): |
Michael Achenbach
2017/04/07 13:02:10
Why not keep **rest? Might be that it's used from
Dan Ehrenberg
2017/04/07 14:06:09
I didn't see any usages in the tree, but anyway, a
|
+def RunProcess(verbose, timeout, args, additionalEnv): |
Michael Achenbach
2017/04/07 13:02:10
nit: additional_env
Dan Ehrenberg
2017/04/07 14:06:09
Done.
|
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(additionalEnv) |
# 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. |
@@ -75,8 +76,7 @@ def RunProcess(verbose, timeout, args, **rest): |
args=popen_args, |
stdout=subprocess.PIPE, |
stderr=subprocess.PIPE, |
- env=env, |
- **rest |
+ env=env |
) |
except Exception as e: |
sys.stderr.write("Error executing: %s\n" % popen_args) |
@@ -126,6 +126,6 @@ def RunProcess(verbose, timeout, args, **rest): |
) |
-def Execute(args, verbose=False, timeout=None): |
+def Execute(args, verbose=False, timeout=None, env={}): |
Michael Achenbach
2017/04/07 13:02:10
env=None
and then pass
env or {}
Dan Ehrenberg
2017/04/07 14:06:09
Done.
Michael Achenbach
2017/04/11 08:38:36
You didn't do the second part, hence the test erro
Dan Ehrenberg
2017/04/11 11:31:51
This was a result of an overconfident search of so
|
args = [ c for c in args if c != "" ] |
- return RunProcess(verbose, timeout, args=args) |
+ return RunProcess(verbose, timeout, args, env) |