fix(mosq): Remove temp modification of IDF files

This commit is contained in:
David Cermak
2025-01-21 12:27:09 +01:00
parent dbd164dd91
commit 9162de1150
3 changed files with 54 additions and 13 deletions
+7 -13
View File
@@ -123,25 +123,18 @@ jobs:
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
export OVERRIDE_PATH=`pwd`/components/mosquitto
echo ${OVERRIDE_PATH}
sed -i '/espressif\/mosquitto:/a \ \ \ \ override_path: "${OVERRIDE_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
cat ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
export MOSQUITTO_PATH=`pwd`/components/mosquitto
# to use the actual version of mosquitto
sed -i '/espressif\/mosquitto:/a \ \ \ \ override_path: "${MOSQUITTO_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
cd ${IDF_PATH}/${{matrix.test.path}}
sed -i 's/4096, /5\*1024, /' main/publish_connect_test.c
cat main/publish_connect_test.c
idf-build-apps find --config sdkconfig.ci.local_broker -vv --target ${{ matrix.idf_target }} --build-dir=${TARGET_TEST_DIR}
idf-build-apps build --config sdkconfig.ci.local_broker -vv --target ${{ matrix.idf_target }} --build-dir=${TARGET_TEST_DIR}
${GITHUB_WORKSPACE}/ci/clean_build_artifacts.sh `pwd`/${TARGET_TEST_DIR}
sed '/@pytest.mark.parametrize.*config.*/{
s/@pytest.mark.parametrize.*config.*local_broker.*/@pytest.mark.protocols/
t
d
}' pytest_mqtt_publish_app.py > ${TARGET_TEST_DIR}/pytest_local_mosq.py
cat ${TARGET_TEST_DIR}/pytest_local_mosq.py
# to replace mqtt test configs with specific mosquitto markers
python ${MOSQUITTO_PATH}/test/replace_decorators.py pytest_mqtt_publish_app.py ${TARGET_TEST_DIR}/pytest_mosquitto.py
zip -qur ${GITHUB_WORKSPACE}/artifacts.zip ${TARGET_TEST_DIR}
- uses: actions/upload-artifact@v4
with:
@@ -179,5 +172,6 @@ jobs:
rm -rf build sdkconfig.defaults
mv $dir build
mv build/*.py .
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32 -m protocols
# Run only "test_mosquitto" marked tests
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32 -m test_mosquitto
done