diff --git a/tools/ci/test_build_system_cmake.sh b/tools/ci/test_build_system_cmake.sh index 0e73339e0..41b820999 100755 --- a/tools/ci/test_build_system_cmake.sh +++ b/tools/ci/test_build_system_cmake.sh @@ -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:" diff --git a/tools/cmake/kconfig.cmake b/tools/cmake/kconfig.cmake index 4eb132d96..8de088b68 100644 --- a/tools/cmake/kconfig.cmake +++ b/tools/cmake/kconfig.cmake @@ -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)