Commit 4e2c2fe9 authored by Vincent Pelletier's avatar Vincent Pelletier

caucase.test: Propagate our environment to caucase.sh .

The test should not need to sanitise the environment of this test in
particular (if we do not trust the environment then there would be a lot
more to sanitise for the python part of the test as well), and the intent
was just to add the CAUCASE_PYTHON variable so caucase.sh runs the expected
python executable and not one possibly picked from PATH.
So copy environment, edit the copy and pass this to the caucase.sh
subprocess.
parent 5932d4fb
......@@ -3757,6 +3757,8 @@ _caucase_sh_path = find_executable(
)
def _runCaucaseSh(*args):
command = (_caucase_sh_path, ) + args
environ = os.environ.copy()
environ['CAUCASE_PYTHON'] = sys.executable
with open(os.devnull, 'rb') as devnull:
process = subprocess.Popen(
command,
......@@ -3764,9 +3766,7 @@ def _runCaucaseSh(*args):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
close_fds=True,
env={
'CAUCASE_PYTHON': sys.executable,
},
env=environ,
)
stdout, _ = process.communicate()
status = process.wait()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment