Merge branch 'bugfix/build_fails_when_editor_assoc_with_py_scripts_v3.1' into 'release/v3.1'

Fix issues with CMake builds when python scripts are associated with an editor (backport v3.1)

See merge request idf/esp-idf!4638
This commit is contained in:
Angus Gratton 2019-04-02 09:39:51 +08:00
commit c278dcb707
2 changed files with 17 additions and 1 deletions

View file

@ -223,6 +223,21 @@ function run_tests()
(grep '"command"' build/compile_commands.json | grep -v mfix-esp32-psram-cache-issue) && failure "All commands in compile_commands.json should use PSRAM cache workaround"
mv sdkconfig.bak sdkconfig
print_status "Make sure a full build never runs '/usr/bin/env python' or similar"
OLDPATH="$PATH"
PYTHON="$(which python)"
rm -rf build
cat > ./python << EOF
#!/bin/sh
echo "The build system has executed '/usr/bin/env python' or similar"
exit 1
EOF
chmod +x ./python
export PATH="$(pwd):$PATH"
${PYTHON} $IDF_PATH/tools/idf.py build || failure "build failed"
export PATH="$OLDPATH"
rm ./python
print_status "All tests completed"
if [ -n "${FAILURES}" ]; then
echo "Some failures were detected:"

View file

@ -129,7 +129,8 @@ function(kconfig_process_config)
COMMAND ${CMAKE_COMMAND} -E env
"COMPONENT_KCONFIGS=${kconfigs}"
"COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}"
${IDF_PATH}/tools/kconfig_new/confserver.py --kconfig ${IDF_PATH}/Kconfig --config ${SDKCONFIG}
${PYTHON} ${IDF_PATH}/tools/kconfig_new/confserver.py
--kconfig ${IDF_PATH}/Kconfig --config ${SDKCONFIG}
VERBATIM
USES_TERMINAL)