CI: Enable publish tests only when started from weekend pipeline

This commit is contained in:
David Cermak 2021-06-10 16:46:12 +02:00
parent 4cdc583ccd
commit 74fd8d7af8
2 changed files with 9 additions and 5 deletions

View File

@ -56,10 +56,11 @@ test_weekend_mqtt:
tags:
- ESP32
- Example_WIFI
variables:
ENV_FILE: "$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test/env.yml"
TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test"
CONFIG_FILE_PATH: "$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test"
script:
- export MQTT_PUBLISH_TEST=1
- export TEST_PATH=$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test
- cd $IDF_PATH/tools/ci/python_packages/tiny_test_fw/bin
- run_cmd python Runner.py $TEST_PATH -c $TEST_PATH/publish_connect_mqtt_.yml -e $TEST_PATH/env.yml
.example_test_esp32_template:
extends:

View File

@ -352,7 +352,10 @@ def test_app_protocol_mqtt_publish_connect(env, extra_data):
raise Exception('Unexpected negotiated protocol {}'.format(s.get_negotiated_protocol()))
#
# start publish tests
# start publish tests only if enabled in the environment (for weekend tests only)
if not os.getenv('MQTT_PUBLISH_TEST'):
return
def start_publish_case(transport, qos, repeat, published, queue):
print('Starting Publish test: transport:{}, qos:{}, nr_of_msgs:{}, msg_size:{}, enqueue:{}'
.format(transport, qos, published, repeat * DEFAULT_MSG_SIZE, queue))