mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14944 from rwalton-arm/fix_ctest_reporting
CMake: unittests: Show all tests in CTest reportpull/14978/head
commit
3d362641fb
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME cellular-framework-common-list-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -16,6 +18,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME cellular-framework-common-util-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -19,6 +21,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME cellular-framework-device-athandler-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -39,6 +41,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
|
|
|
|||
|
|
@ -906,6 +906,7 @@ TEST_F(TestATHandler, test_ATHandler_resp_start)
|
|||
|
||||
filehandle_stub_table = NULL;
|
||||
filehandle_stub_table_pos = 0;
|
||||
mbed_poll_stub::revents_value = POLLIN;
|
||||
|
||||
ATHandler at(&fh1, que, 0, ",");
|
||||
at.resp_start();
|
||||
|
|
@ -914,6 +915,7 @@ TEST_F(TestATHandler, test_ATHandler_resp_start)
|
|||
char table2[] = "\"2,\"OK\r\n\0";
|
||||
filehandle_stub_table = table2;
|
||||
filehandle_stub_table_pos = 0;
|
||||
mbed_poll_stub::int_value = strlen(table2);
|
||||
|
||||
at.flush();
|
||||
at.clear_error();
|
||||
|
|
@ -1052,12 +1054,14 @@ TEST_F(TestATHandler, test_ATHandler_resp_stop)
|
|||
{
|
||||
EventQueue que;
|
||||
FileHandle_stub fh1;
|
||||
mbed_poll_stub::revents_value = POLLIN;
|
||||
|
||||
ATHandler at(&fh1, que, 0, ",");
|
||||
|
||||
char table[] = "21 OK\r\n\0";
|
||||
filehandle_stub_table = table;
|
||||
filehandle_stub_table_pos = 0;
|
||||
mbed_poll_stub::int_value = strlen(table);
|
||||
|
||||
at.info_elem('2');
|
||||
at.set_stop_tag("OK\r\n");
|
||||
|
|
@ -1266,6 +1270,7 @@ TEST_F(TestATHandler, test_ATHandler_at_cmd_str)
|
|||
{
|
||||
EventQueue que;
|
||||
FileHandle_stub fh1;
|
||||
mbed_poll_stub::revents_value = POLLIN;
|
||||
|
||||
ATHandler at(&fh1, que, 0, ",");
|
||||
uint8_t byte[] = {1, 2, 3, 4};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME cellular-framework-device-cellular-context-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -45,6 +47,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME cellular-framework-device-cellular-device-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -41,6 +43,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME cellular-framework-device-cellular-state-machine-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -43,6 +45,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "cellular")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loramac-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -45,6 +47,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ TEST_F(Test_LoRaMac, post_process_mcps_req)
|
|||
LoRaMacCrypto_stub::int_table_idx_value = 0;
|
||||
LoRaMacCrypto_stub::int_table[0] = 4;
|
||||
LoRaMacCrypto_stub::int_table[1] = 4;
|
||||
// LoRaPHY_stub::uint16_value = 0;
|
||||
LoRaPHY_stub::uint16_value = 0;
|
||||
object->on_radio_rx_done(payload, 16, 0, 0);
|
||||
object->post_process_mcps_req();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loramac-channel-plan-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -29,6 +31,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loramac-command-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -30,6 +32,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loramac-crypto-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -28,6 +30,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -33,6 +35,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-as923-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -31,6 +33,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-au915-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -37,6 +39,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-cn470-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -37,6 +39,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-cn779-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -31,6 +33,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-eu433-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -32,6 +34,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-eu868-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -31,6 +33,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-in865-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -31,6 +33,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-kr920-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -32,6 +34,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-loraphy-us915-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
MBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8
|
||||
)
|
||||
|
|
@ -38,6 +40,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-lorawan-interface-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_PHY=EU868
|
||||
MBED_CONF_LORA_PHY=EU868
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
)
|
||||
|
||||
|
|
@ -32,6 +34,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-lorawan-stack-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -8,7 +10,7 @@ add_executable(${TEST_NAME})
|
|||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_CONF_LORA_OVER_THE_AIR_ACTIVATION=true
|
||||
MBED_CONF_LORA_AUTOMATIC_UPLINK_MESSAGE=true
|
||||
MBED_CONF_LORA_AUTOMATIC_UPLINK_MESSAGE=true
|
||||
MBED_CONF_LORA_TX_MAX_SIZE=255
|
||||
)
|
||||
|
||||
|
|
@ -32,6 +34,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -631,6 +631,7 @@ TEST_F(Test_LoRaWANStack, acquire_tx_metadata)
|
|||
memset(&conf, 0, sizeof(conf));
|
||||
conf.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
LoRaMac_stub::mcps_conf_ptr = &conf;
|
||||
LoRaMac_stub::bool_true_counter = 1;
|
||||
radio._ev->tx_done();
|
||||
|
||||
LoRaMac_stub::slot_value = RX_SLOT_WIN_2;
|
||||
|
|
@ -695,6 +696,11 @@ TEST_F(Test_LoRaWANStack, acquire_rx_metadata)
|
|||
cb.battery_level = batt_lvl;
|
||||
EXPECT_TRUE(LORAWAN_STATUS_OK == object->set_lora_callbacks(&cb));
|
||||
mlme.req_type = MLME_LINK_CHECK;
|
||||
|
||||
loramac_mlme_indication_t ind2;
|
||||
memset(&ind2, 0, sizeof(ind2));
|
||||
LoRaMac_stub::mlme_ind_ptr = &ind2;
|
||||
|
||||
mlme.status = LORAMAC_EVENT_INFO_STATUS_OK;
|
||||
LoRaMac_stub::bool_true_counter = true;
|
||||
radio._ev->rx_done(NULL, 0, 0, 0);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME lorawan-lorawan-timer-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -28,6 +30,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "lorawan")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-cellular-nonip-socket-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -34,6 +36,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-dtls-socket-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -42,6 +44,4 @@ set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/
|
|||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-dtls-socket-wrapper-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -41,6 +43,4 @@ set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/tests/U
|
|||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-ethernet-interface-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -36,6 +38,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-iface-dns-socket-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -50,6 +52,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-internet-socket-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -33,6 +35,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-network-interface-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -29,6 +31,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-network-stack-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -33,6 +35,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-ppp-interface-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -35,6 +37,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-socket-address-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -25,6 +27,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-tcp-socket-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -34,6 +36,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-tls-socket-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -39,6 +41,4 @@ set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/test_TLSSocket.cpp PROPERT
|
|||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/TLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-tls-socket-wrapper-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -42,6 +44,4 @@ set(MBEDTLS_USER_CONFIG_FILE_PATH "\"${mbed-os_SOURCE_DIR}/connectivity/netsocke
|
|||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
set_source_files_properties(${mbed-os_SOURCE_DIR}/connectivity/netsocket/source/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-udp-socket-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -35,6 +37,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME netsocket-wifi-access-point-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -19,6 +21,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "netsocket")
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME pwmout-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
DEVICE_PWMOUT
|
||||
)
|
||||
|
|
@ -27,6 +29,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "drivers")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "drivers")
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME watchdog-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
DEVICE_WATCHDOG
|
||||
MBED_WDOG_ASSERT=1
|
||||
|
|
@ -28,6 +30,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "drivers")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "drivers")
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME equeue-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
EQUEUE_PLATFORM_POSIX
|
||||
)
|
||||
|
|
@ -16,8 +18,8 @@ target_compile_options(${TEST_NAME}
|
|||
)
|
||||
|
||||
target_sources(${TEST_NAME}
|
||||
PRIVATE
|
||||
${mbed-os_SOURCE_DIR}/events/source/equeue.c
|
||||
PRIVATE
|
||||
${mbed-os_SOURCE_DIR}/events/source/equeue.c
|
||||
test_equeue.cpp
|
||||
)
|
||||
|
||||
|
|
@ -31,6 +33,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "equeue")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "equeue")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME circularbuffer-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -16,6 +18,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "platform")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "platform")
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME sfdp-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
DEVICE_SPI
|
||||
)
|
||||
|
|
@ -25,6 +27,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME chaining-blockdevice-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -22,6 +24,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME filesystemstore-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
MBED_LFS_READ_SIZE=64
|
||||
MBED_LFS_PROG_SIZE=64
|
||||
|
|
@ -43,6 +45,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(TEST_NAME tdbstore-unittest)
|
||||
|
||||
add_executable(${TEST_NAME})
|
||||
|
|
@ -25,6 +27,4 @@ target_link_libraries(${TEST_NAME}
|
|||
gmock_main
|
||||
)
|
||||
|
||||
add_test(NAME "${TEST_NAME}" COMMAND ${TEST_NAME})
|
||||
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
gtest_discover_tests(${TEST_NAME} PROPERTIES LABELS "storage")
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ TEST_F(TDBStoreModuleTest, corrupted_set_deinit_init_get)
|
|||
|
||||
srand(0); // Prefer to have always the same pattern
|
||||
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
EXPECT_EQ(tdb.deinit(), MBED_SUCCESS);
|
||||
// Corrupt the first part of the storage
|
||||
for (int j = 0; j < heap.size() / BLOCK_SIZE / 2; j++) {
|
||||
|
|
@ -109,7 +109,7 @@ TEST_F(TDBStoreModuleTest, corrupted_set_deinit_init_get)
|
|||
EXPECT_EQ(heap.program(block, BLOCK_SIZE * j, BLOCK_SIZE), MBED_SUCCESS);
|
||||
}
|
||||
EXPECT_EQ(tdb.init(), MBED_SUCCESS);
|
||||
for (int j = 0; j < 100; ++j) {
|
||||
for (int j = 0; j < 10; ++j) {
|
||||
// Use random data, so the data has to be updated
|
||||
EXPECT_EQ(tdb.set("key", block + j, 50, 0), MBED_SUCCESS);
|
||||
EXPECT_EQ(tdb.deinit(), MBED_SUCCESS);
|
||||
|
|
|
|||
Loading…
Reference in New Issue