From a64139690bdee0f026d6ba6edb1d53aee0748d7f Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Mon, 25 Mar 2019 10:41:28 +0800 Subject: [PATCH 1/2] cmake: Fix for Python files executed directly, not via PYTHON variable --- tools/cmake/kconfig.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From c27d9d9d4e4387449650ca9aa36706b6ef976b59 Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Tue, 12 Mar 2019 13:28:06 +0800 Subject: [PATCH 2/2] ci: test full build never runs '/usr/bin/env python' or similar --- tools/ci/test_build_system_cmake.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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:"