forked from espressif/esp-idf
Merge branch 'bugfix/test_build_system_fixtures' into 'master'
build system tests: fix issues with idf_copy and get_idf_build_env See merge request espressif/esp-idf!21754
This commit is contained in:
@@ -120,6 +120,7 @@ def idf_copy(session_work_dir: Path, request: FixtureRequest) -> typing.Generato
|
||||
shutil.copytree(path_from, path_to, ignore=ignore, symlinks=True)
|
||||
|
||||
orig_idf_path = os.environ['IDF_PATH']
|
||||
os.environ['IDF_PATH'] = str(path_to)
|
||||
|
||||
yield Path(path_to)
|
||||
|
||||
|
@@ -43,8 +43,11 @@ def get_idf_build_env(idf_path: str) -> EnvDict:
|
||||
'--format=key-value'
|
||||
]
|
||||
keys_values = subprocess.check_output(cmd, stderr=subprocess.PIPE).decode()
|
||||
env_vars = {key: os.path.expandvars(value) for key, value in
|
||||
[line.split('=') for line in keys_values.splitlines()]}
|
||||
idf_tool_py_env = {key: os.path.expandvars(value) for key, value in
|
||||
[line.split('=') for line in keys_values.splitlines()]}
|
||||
env_vars = {} # type: EnvDict
|
||||
env_vars.update(os.environ)
|
||||
env_vars.update(idf_tool_py_env)
|
||||
# not set by idf_tools.py, normally set by export.sh
|
||||
env_vars['IDF_PATH'] = idf_path
|
||||
|
||||
|
Reference in New Issue
Block a user