Skip to content

Commit

Permalink
WIP: xml must be global, per-test.
Browse files Browse the repository at this point in the history
  • Loading branch information
CIPop committed Aug 16, 2023
1 parent 3a18e05 commit 8706021
Show file tree
Hide file tree
Showing 8 changed files with 636 additions and 782 deletions.
58 changes: 48 additions & 10 deletions MQTTPacket/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ ENDIF ()
# transport.h/c are reused from ../samples:
include_directories(../src ../src/V5 ../samples)

# test1 - MQTTv3 serializer test
ADD_EXECUTABLE(
test1
test_framework.c
test1.c
)

Expand All @@ -39,8 +41,10 @@ SET_TESTS_PROPERTIES(
PROPERTIES TIMEOUT 540
)

# test2 - MQTTv5 serializer test
ADD_EXECUTABLE(
test2
test_framework.c
test2.c
)

Expand All @@ -63,9 +67,11 @@ SET_TESTS_PROPERTIES(
PROPERTIES TIMEOUT 540
)


# test3 - MQTTv3 broker test
ADD_EXECUTABLE(
test3
test_framework.c
test_mqtt3.c
test3.c
../samples/transport.c
)
Expand All @@ -76,7 +82,7 @@ target_compile_options(test3 PRIVATE -Wno-deprecated-declarations)

TARGET_LINK_LIBRARIES(
test3
paho-embed-mqtt5c
paho-embed-mqtt3c
)

ADD_TEST(
Expand All @@ -89,29 +95,61 @@ SET_TESTS_PROPERTIES(
PROPERTIES TIMEOUT 540
)

# test4 - MQTTv5 broker test
ADD_EXECUTABLE(
test4
test_framework.c
test_mqtt5.c
test4.c
../samples/transport.c
)

# Disabling deprecation warnings:
# warning: ‘ftime’ is deprecated [-Wdeprecated-declarations]
target_compile_options(test4 PRIVATE -Wno-deprecated-declarations)

TARGET_LINK_LIBRARIES(
test4
paho-embed-mqtt5c
)

ADD_TEST(
NAME test4
COMMAND "test4" "--connection" ${MQTT_TEST_BROKER}
)

SET_TESTS_PROPERTIES(
test4
PROPERTIES TIMEOUT 540
)

# test5 - MQTTv3 side-by-side with MQTTv5 broker test
ADD_EXECUTABLE(
test35
test35.c
test5
test_framework.c
test_mqtt3.c
test_mqtt5.c
test5.c
../samples/transport.c
)

# Disabling deprecation warnings:
# warning: ‘ftime’ is deprecated [-Wdeprecated-declarations]
target_compile_options(test35 PRIVATE -Wno-deprecated-declarations)
target_compile_definitions(test35 PRIVATE NOSIGPIPE)
target_compile_options(test5 PRIVATE -Wno-deprecated-declarations)
target_compile_definitions(test5 PRIVATE NOSIGPIPE)

TARGET_LINK_LIBRARIES(
test35
test5
paho-embed-mqtt3c
paho-embed-mqtt5c
)

ADD_TEST(
NAME test35
COMMAND "test35" "--connection" ${MQTT_TEST_BROKER}
NAME test5
COMMAND "test5" "--connection" ${MQTT_TEST_BROKER}
)

SET_TESTS_PROPERTIES(
test35
test5
PROPERTIES TIMEOUT 540
)
Loading

0 comments on commit 8706021

Please sign in to comment.