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
Pipeline #18224 passed with stage
in 0 seconds
...@@ -3757,6 +3757,8 @@ _caucase_sh_path = find_executable( ...@@ -3757,6 +3757,8 @@ _caucase_sh_path = find_executable(
) )
def _runCaucaseSh(*args): def _runCaucaseSh(*args):
command = (_caucase_sh_path, ) + args command = (_caucase_sh_path, ) + args
environ = os.environ.copy()
environ['CAUCASE_PYTHON'] = sys.executable
with open(os.devnull, 'rb') as devnull: with open(os.devnull, 'rb') as devnull:
process = subprocess.Popen( process = subprocess.Popen(
command, command,
...@@ -3764,9 +3766,7 @@ def _runCaucaseSh(*args): ...@@ -3764,9 +3766,7 @@ def _runCaucaseSh(*args):
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
close_fds=True, close_fds=True,
env={ env=environ,
'CAUCASE_PYTHON': sys.executable,
},
) )
stdout, _ = process.communicate() stdout, _ = process.communicate()
status = process.wait() 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