@@ -123,25 +123,18 @@ jobs:
123123 run : |
124124 . ${IDF_PATH}/export.sh
125125 pip install idf-component-manager idf-build-apps --upgrade
126- export OVERRIDE_PATH=`pwd`/components/mosquitto
127- echo ${OVERRIDE_PATH}
128- sed -i '/espressif\/mosquitto:/a \ \ \ \ override_path: "${OVERRIDE_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
129- cat ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
126+ export MOSQUITTO_PATH=`pwd`/components/mosquitto
127+ # to use the actual version of mosquitto
128+ sed -i '/espressif\/mosquitto:/a \ \ \ \ override_path: "${MOSQUITTO_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
130129 export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
131130 export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
132131 export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
133132 cd ${IDF_PATH}/${{matrix.test.path}}
134- sed -i 's/4096, /5\*1024, /' main/publish_connect_test.c
135- cat main/publish_connect_test.c
136133 idf-build-apps find --config sdkconfig.ci.local_broker -vv --target ${{ matrix.idf_target }} --build-dir=${TARGET_TEST_DIR}
137134 idf-build-apps build --config sdkconfig.ci.local_broker -vv --target ${{ matrix.idf_target }} --build-dir=${TARGET_TEST_DIR}
138135 ${GITHUB_WORKSPACE}/ci/clean_build_artifacts.sh `pwd`/${TARGET_TEST_DIR}
139- sed '/@pytest.mark.parametrize.*config.*/{
140- s/@pytest.mark.parametrize.*config.*local_broker.*/@pytest.mark.protocols/
141- t
142- d
143- }' pytest_mqtt_publish_app.py > ${TARGET_TEST_DIR}/pytest_local_mosq.py
144- cat ${TARGET_TEST_DIR}/pytest_local_mosq.py
136+ # to replace mqtt test configs with specific mosquitto markers
137+ python ${MOSQUITTO_PATH}/test/replace_decorators.py pytest_mqtt_publish_app.py ${TARGET_TEST_DIR}/pytest_mosquitto.py
145138 zip -qur ${GITHUB_WORKSPACE}/artifacts.zip ${TARGET_TEST_DIR}
146139 - uses : actions/upload-artifact@v4
147140 with :
@@ -179,5 +172,6 @@ jobs:
179172 rm -rf build sdkconfig.defaults
180173 mv $dir build
181174 mv build/*.py .
182- python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32 -m protocols
175+ # Run only "test_mosquitto" marked tests
176+ python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32 -m test_mosquitto
183177 done
0 commit comments