Commit e6dbe652 authored by Boxiang Sun's avatar Boxiang Sun

caucase.test: use system environment to run the caucase test

skip the caucase shell test if no jq was installed
this change was write by Vincent Pelletier
parent 2ff0331f
...@@ -3787,6 +3787,8 @@ _caucase_sh_path = find_executable( ...@@ -3787,6 +3787,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,
...@@ -3794,9 +3796,7 @@ def _runCaucaseSh(*args): ...@@ -3794,9 +3796,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