Skip to content

Commit f8619e3

Browse files
Reactivate kvstore and general filesystem Greentea tests (#508)
* Reactivate kvstore Greentea tests * Fix build error by checking flash size * Also allow filtering by RAM size * Add flash requirement for kvstore static * Add flash API requirement
1 parent 6f2c180 commit f8619e3

File tree

24 files changed

+149
-62
lines changed

24 files changed

+149
-62
lines changed

storage/blockdevice/tests/TESTS/blockdevice/heap_block_device/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ mbed_greentea_add_test(
88
main.cpp
99
TEST_REQUIRED_LIBS
1010
mbed-storage-blockdevice
11+
NEEDED_RAM_KIB 6
1112
)

storage/blockdevice/tests/TESTS/blockdevice/mbr_block_device/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ mbed_greentea_add_test(
88
main.cpp
99
TEST_REQUIRED_LIBS
1010
mbed-storage-blockdevice
11+
NEEDED_RAM_KIB 10
1112
)

storage/blockdevice/tests/TESTS/blockdevice/util_block_device/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ mbed_greentea_add_test(
88
main.cpp
99
TEST_REQUIRED_LIBS
1010
mbed-storage-blockdevice
11+
NEEDED_RAM_KIB 10
1112
)

storage/filesystem/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
if(MBED_ENABLE_OS_INTERNAL_TESTS)
55
if(MBED_BUILD_GREENTEA_TESTS)
6-
# add greentea test
6+
add_subdirectory(tests/TESTS/filesystem)
77
else()
88
add_subdirectory(tests/UNITTESTS)
99
endif()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 Jamie Smith.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(general_filesystem)
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5-
6-
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7-
set(TEST_TARGET mbed-storage-filesystem-general_filesystem)
8-
9-
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10-
11-
project(${TEST_TARGET})
4+
if((NOT "COMPONENT_SPIF=1" IN_LIST MBED_TARGET_DEFINITIONS) AND
5+
(NOT "COMPONENT_QSPIF=1" IN_LIST MBED_TARGET_DEFINITIONS) AND
6+
(NOT "COMPONENT_OSPIF=1" IN_LIST MBED_TARGET_DEFINITIONS) AND
7+
(NOT "COMPONENT_SD=1" IN_LIST MBED_TARGET_DEFINITIONS))
8+
set(SKIP_REASON "External block device needed.")
9+
endif()
1210

1311
mbed_greentea_add_test(
1412
TEST_NAME
15-
${TEST_TARGET}
13+
mbed-storage-filesystem-general_filesystem
1614
TEST_SOURCES
1715
main.cpp
1816
TEST_REQUIRED_LIBS
1917
mbed-storage-littlefs
2018
mbed-storage
2119
mbed-storage-sd
20+
TEST_SKIPPED
21+
${SKIP_REASON}
2222
)

storage/kvstore/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
if(MBED_ENABLE_OS_INTERNAL_TESTS)
55
if(MBED_BUILD_GREENTEA_TESTS)
6-
# add greentea test
6+
add_subdirectory(tests/TESTS/kvstore)
77
else()
88
add_subdirectory(tests/UNITTESTS)
99
endif()

storage/kvstore/direct_access_devicekey/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
if(MBED_ENABLE_OS_INTERNAL_TESTS)
5+
if(MBED_BUILD_GREENTEA_TESTS)
6+
add_subdirectory(tests/TESTS/direct_access_devicekey)
7+
endif()
8+
endif()
9+
410
add_library(mbed-storage-direct-access-devicekey STATIC EXCLUDE_FROM_ALL)
511

612
target_include_directories(mbed-storage-direct-access-devicekey
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 Jamie Smith.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(tdb)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2025 Jamie Smith.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(NOT "DEVICE_FLASH=1" IN_LIST MBED_TARGET_DEFINITIONS)
5+
set(TEST_SKIPPED "This test requires flash support!")
6+
endif()
7+
8+
mbed_greentea_add_test(
9+
TEST_NAME
10+
mbed-storage-kvstore-direct-access-devicekey
11+
TEST_SKIPPED
12+
${TEST_SKIPPED}
13+
TEST_SOURCES
14+
main.cpp
15+
TEST_REQUIRED_LIBS
16+
mbed-storage-direct-access-devicekey
17+
)

0 commit comments

Comments
 (0)