Skip to content

Commit

Permalink
Change to use env var instead of config option
Browse files Browse the repository at this point in the history
  • Loading branch information
embhorn committed Oct 17, 2023
1 parent 74ba7ed commit 919c076
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 44 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/fsanitize-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-noextbrokers CC="gcc -fsanitize=address"
run: ./configure CC="gcc -fsanitize=address"
- name: make
run: make
- name: make check
run: make check
- name: configure with SN Enabled
run: ./configure --enable-sn --enable-noextbrokers CC="gcc -fsanitize=address"
run: ./configure --enable-sn CC="gcc -fsanitize=address"
- name: make
run: make
- name: make check
run: make check
- name: configure with Non-Block
run: ./configure --enable-nonblock --enable-noextbrokers CFLAGS="-DWOLFMQTT_TEST_NONBLOCK" CC="gcc -fsanitize=address"
run: ./configure --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK" CC="gcc -fsanitize=address"
- name: make
run: make
- name: make check
run: make check
- name: configure with Non-Block and Multi-threading
run: ./configure --enable-mt --enable-nonblock --enable-noextbrokers CFLAGS="-DWOLFMQTT_TEST_NONBLOCK" CC="gcc -fsanitize=address"
run: ./configure --enable-mt --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK" CC="gcc -fsanitize=address"
- name: make
run: make
- name: make check
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/macos-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,25 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-noextbrokers
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: configure with SN Enabled
run: ./configure --enable-sn --enable-noextbrokers
run: ./configure --enable-sn
- name: make
run: make
- name: make check
run: make check
- name: configure with Non-Block
run: ./configure --enable-nonblock --enable-noextbrokers CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
run: ./configure --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
run: make check
- name: configure with Non-Block and Multi-threading
run: ./configure --enable-mt --enable-nonblock --enable-noextbrokers CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
run: ./configure --enable-mt --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
Expand Down
14 changes: 8 additions & 6 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 @@ -33,7 +33,7 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-noextbrokers
run: ./configure
- name: make
run: make
- name: make check
Expand All @@ -43,8 +43,10 @@ jobs:
if: ${{ failure() && steps.make-check.outcome == 'failure' }}
run: |
more test-suite.log
- name: Set WOLFMQTT_NO_EXTERNAL_BROKER_TESTS to exclude external broker tests
env: WOLFMQTT_NO_EXTERNAL_BROKER_TESTS:1
- name: configure with SN Enabled
run: ./configure --enable-sn --enable-noextbrokers
run: ./configure --enable-sn
- name: make
run: make
- name: make check
Expand All @@ -55,7 +57,7 @@ jobs:
run: |
more test-suite.log
- name: configure with Non-Block
run: ./configure --enable-nonblock --enable-noextbrokers CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
run: ./configure --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
Expand All @@ -66,7 +68,7 @@ jobs:
run: |
more test-suite.log
- name: configure with Non-Block and Multi-threading
run: ./configure --enable-mt --enable-nonblock --enable-noextbrokers CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
run: ./configure --enable-mt --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ check_SCRIPTS =
dist_noinst_SCRIPTS =
dist_doc_DATA =


#includes additional rules from aminclude.am
@INC_AMINCLUDE@
DISTCLEANFILES+= aminclude.am
Expand Down
8 changes: 0 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,6 @@ then
AM_CFLAGS="$AM_CFLAGS -DWOLFMQTT_MULTITHREAD"
fi

# No external brokers, used to disable examples that use external brokers
AC_ARG_ENABLE([noextbrokers],
[AS_HELP_STRING([--enable-noextbrokers],[Enable noextbrokers (default: disabled)])],
[ ENABLED_NOEXTBROKERS=$enableval ],
[ ENABLED_NOEXTBROKERS=no ]
)


AM_CONDITIONAL([HAVE_LIBWOLFSSL], [test "x$ENABLED_TLS" = "xyes"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"])
Expand All @@ -322,7 +315,6 @@ AM_CONDITIONAL([BUILD_SN], [test "x$ENABLED_SN" = "xyes"])
AM_CONDITIONAL([BUILD_MQTT5], [test "x$ENABLED_MQTTV50" = "xyes"])
AM_CONDITIONAL([BUILD_NONBLOCK], [test "x$ENABLED_NONBLOCK" = "xyes"])
AM_CONDITIONAL([BUILD_MULTITHREAD], [test "x$ENABLED_MULTITHREAD" = "xyes"])
AM_CONDITIONAL([BUILD_NOEXTBROKERS], [test "x$ENABLED_NOEXTBROKERS" = "xyes"])



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
8 changes: 4 additions & 4 deletions scripts/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ include scripts/broker_test/include.am
if BUILD_EXAMPLES
dist_noinst_SCRIPTS += scripts/client.test \
scripts/firmware.test \
scripts/azureiothub.test \
scripts/awsiot.test \
scripts/nbclient.test
# WIOT test broker disabled 31MAY2021
# scripts/wiot.test
if BUILD_MULTITHREAD
dist_noinst_SCRIPTS += scripts/multithread.test
endif
if !BUILD_NOEXTBROKERS
dist_noinst_SCRIPTS += scripts/azureiothub.test \
scripts/awsiot.test
endif

endif

0 comments on commit 919c076

Please sign in to comment.