Skip to content

Commit fc9369f

Browse files
RC-Repositoriesurutva
authored andcommitted
aws-iot: Add unit tests for ota_agent_task.c
Adds 76 unit tests. The CMakeLists.txt within the tests subdirectory are also modified so that the tests run on calling ctest. Signed-off-by: Reuben Cartwright <[email protected]>
1 parent 9d734ab commit fc9369f

File tree

2 files changed

+1275
-0
lines changed

2 files changed

+1275
-0
lines changed

components/aws_iot/ota_for_aws_iot_embedded_sdk/integration/tests/CMakeLists.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,31 @@
55
# application-specific mocks
66
add_subdirectory(config_mocks)
77

8+
add_executable(ota-agent-task-test
9+
test_ota_agent_task.cpp
10+
../src/ota_agent_task.c
11+
)
12+
target_include_directories(ota-agent-task-test
13+
PRIVATE
14+
.
15+
16+
../../library_mocks/inc
17+
18+
# ota_agent_task.c has no .h file, so we include 'src' not 'inc'
19+
../src
20+
)
21+
target_link_libraries(ota-agent-task-test
22+
PRIVATE
23+
coremqtt-agent-integration-mock
24+
coremqtt-agent-mock
25+
coremqtt-mock
26+
fff
27+
freertos-kernel-mock
28+
freertos-ota-pal-psa-mock
29+
helpers-events-mock
30+
helpers-logging-mock
31+
trusted-firmware-m-mock
32+
ota-for-aws-iot-embedded-sdk-mock
33+
ota-for-aws-iot-embedded-sdk-test-specific-mock
34+
)
35+
iot_reference_arm_corstone3xx_add_test(ota-agent-task-test)

0 commit comments

Comments
 (0)