Skip to content

Commit

Permalink
Merge pull request #362 from embhorn/ci_update
Browse files Browse the repository at this point in the history
Exclude CI tests with external brokers
  • Loading branch information
dgarske authored Oct 17, 2023
2 parents 751777b + 06465df commit d8e9699
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/fsanitize-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:

runs-on: ubuntu-latest
timeout-minutes: 5
env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1

steps:
- uses: actions/checkout@master
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/macos-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:

runs-on: macos-latest
timeout-minutes: 10
env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1
steps:
- uses: actions/checkout@master
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ubuntu-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
repository: wolfssl/wolfssl
path: wolfssl
- name: wolfssl autogen
working-directory: ./wolfssl
working-directory: ./wolfssl
run: ./autogen.sh
- name: wolfssl configure
working-directory: ./wolfssl
working-directory: ./wolfssl
run: ./configure --enable-enckeys
- name: wolfssl make
working-directory: ./wolfssl
Expand All @@ -43,6 +43,8 @@ jobs:
if: ${{ failure() && steps.make-check.outcome == 'failure' }}
run: |
more test-suite.log
env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1
- name: configure with SN Enabled
run: ./configure --enable-sn
- name: make
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ if (WOLFMQTT_EXAMPLES)
add_mqtt_example(fwpush firmware/fwpush.c)
add_mqtt_example(fwclient firmware/fwclient.c)
add_mqtt_example(mqtt-pub pub-sub/mqtt-pub.c)
add_mqtt_example(mqtt-pub pub-sub/mqtt-sub.c)
add_mqtt_example(mqtt-sub pub-sub/mqtt-sub.c)
endif()

####################################################
Expand Down
22 changes: 13 additions & 9 deletions scripts/awsiot.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@
# Check for application
[ ! -x ./examples/aws/awsiot ] && echo -e "\n\nAWS IoT MQTT Client doesn't exist" && exit 1

def_args="-T -C 2000"
if test -n "$WOLFMQTT_NO_EXTERNAL_BROKER_TESTS"; then
echo "WOLFMQTT_NO_EXTERNAL_BROKER_TESTS set, won't run"
else
def_args="-T -C 2000"

# Run with TLS and QoS 0-1
# Run with TLS and QoS 0-1

./examples/aws/awsiot $def_args -t -q 0 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAWS IoT MQTT Client failed! TLS=On, QoS=0" && exit 1
./examples/aws/awsiot $def_args -t -q 0 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAWS IoT MQTT Client failed! TLS=On, QoS=0" && exit 1

./examples/aws/awsiot $def_args -t -q 1 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAWS IoT MQTT Client failed! TLS=On, QoS=1" && exit 1
./examples/aws/awsiot $def_args -t -q 1 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAWS IoT MQTT Client failed! TLS=On, QoS=1" && exit 1

echo -e "\n\nAWS IoT MQTT Client Tests Passed"
echo -e "\n\nAWS IoT MQTT Client Tests Passed"
fi

exit 0
22 changes: 13 additions & 9 deletions scripts/azureiothub.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@
# Check for application
[ ! -x ./examples/azure/azureiothub ] && echo -e "\n\nAzureIotHub MQTT Client doesn't exist" && exit 1

def_args="-T -C 2000"
if test -n "$WOLFMQTT_NO_EXTERNAL_BROKER_TESTS"; then
echo "WOLFMQTT_NO_EXTERNAL_BROKER_TESTS set, won't run"
else
def_args="-T -C 2000"

# Run with TLS and QoS 0-1
# Run with TLS and QoS 0-1

./examples/azure/azureiothub $def_args -t -q 0 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAzureIotHub MQTT Client failed! TLS=On, QoS=0" && exit 1
./examples/azure/azureiothub $def_args -t -q 0 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAzureIotHub MQTT Client failed! TLS=On, QoS=0" && exit 1

./examples/azure/azureiothub $def_args -t -q 1 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAzureIotHub MQTT Client failed! TLS=On, QoS=1" && exit 1
./examples/azure/azureiothub $def_args -t -q 1 $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nAzureIotHub MQTT Client failed! TLS=On, QoS=1" && exit 1

echo -e "\n\nAzureIotHub MQTT Client Tests Passed"
echo -e "\n\nAzureIotHub MQTT Client Tests Passed"
fi

exit 0

0 comments on commit d8e9699

Please sign in to comment.