Skip to content

Commit 1d9c13e

Browse files
authored
Merge pull request #13307 from rajkan01/storage_kv_dir_resturcture
Restructure storage kvstore directory
2 parents f83d100 + ca84e11 commit 1d9c13e

File tree

45 files changed

+51
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+51
-71
lines changed

.astyleignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@
2727
^tools
2828
^UNITTESTS
2929
^storage/blockdevice/tests/UNITTESTS
30+
^storage/kvstore/tests/UNITTESTS

TESTS/configs/baremetal.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@
2222
"network-emac",
2323
"flashiap-block-device",
2424
"system-storage",
25-
"filesystemstore",
2625
"SecureStore",
2726
"storage",
28-
"kv-map",
27+
"kv-global-api",
2928
"direct-access-devicekey",
30-
"tdbstore",
3129
"kv-config",
3230
"events",
33-
"kv-global-api",
3431
"sd",
3532
"qspif",
3633
"spif-driver",

UNITTESTS/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ set(unittest-includes-base
118118
"${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include"
119119
"${PROJECT_SOURCE_DIR}/../storage/blockdevice/include"
120120
"${PROJECT_SOURCE_DIR}/../storage/filesystem/include"
121+
"${PROJECT_SOURCE_DIR}/../storage/kvstore/include"
122+
"${PROJECT_SOURCE_DIR}/../storage/kvstore/kv_config"
123+
"${PROJECT_SOURCE_DIR}/../storage/kvstore/kv_config/include"
121124
"${PROJECT_SOURCE_DIR}/../drivers"
122125
"${PROJECT_SOURCE_DIR}/../hal"
123126
"${PROJECT_SOURCE_DIR}/../events"
@@ -146,7 +149,6 @@ set(unittest-includes-base
146149
"${PROJECT_SOURCE_DIR}/../features/lorawan/system"
147150
"${PROJECT_SOURCE_DIR}/../features/mbedtls"
148151
"${PROJECT_SOURCE_DIR}/../features/mbedtls/inc"
149-
"${PROJECT_SOURCE_DIR}/../storage/kvstore/conf"
150152
)
151153

152154
# Create a list for test suites.

UNITTESTS/empty_baseline/unittest.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ set(unittest-includes ${unittest-includes}
1212
)
1313

1414
set(unittest-sources
15-
../storage/kvstore/global_api/kvstore_global_api.cpp
16-
../storage/kvstore/securestore/SecureStore.cpp
17-
../storage/kvstore/kv_map/KVMap.cpp
18-
../storage/kvstore/tdbstore/TDBStore.cpp
19-
../storage/kvstore/direct_access_devicekey/DirectAccessDevicekey.cpp
20-
../storage/kvstore/conf/kv_config.cpp
21-
../storage/kvstore/filesystemstore/FileSystemStore.cpp
2215
../storage/system_storage/SystemStorage.cpp
2316
)
2417

UNITTESTS/stubs/kv_config_stub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include "storage/kvstore/conf/kv_config.h"
18+
#include "kv_config/kv_config.h"
1919

2020
const char *get_filesystemstore_folder_path()
2121
{

features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbed_lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mbedtls",
77
"storage",
88
"flashiap-block-device",
9-
"tdbstore",
9+
"kv-global-api",
1010
"storage_tdb_internal"
1111
]
1212
}

features/device_key/source/DeviceKey.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#if DEVICEKEY_ENABLED
2020
#include "mbedtls/cmac.h"
2121
#include "mbedtls/platform.h"
22-
#include "storage/kvstore/include/KVStore.h"
23-
#include "storage/kvstore/tdbstore/TDBStore.h"
24-
#include "storage/kvstore/kv_map/KVMap.h"
25-
#include "storage/kvstore/conf/kv_config.h"
22+
#include "kvstore/KVStore.h"
23+
#include "kvstore/TDBStore.h"
24+
#include "kvstore/KVMap.h"
25+
#include "kv_config/kv_config.h"
2626
#include "mbed_wait_api.h"
2727
#include <stdlib.h>
2828
#include "platform/mbed_error.h"

storage/kvstore/direct_access_devicekey/DirectAccessDevicekey.cpp renamed to storage/kvstore/direct_access_devicekey/source/DirectAccessDevicekey.cpp

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

1717
// ----------------------------------------------------------- Includes -----------------------------------------------------------
1818
#if DEVICE_FLASH
19-
#include "DirectAccessDevicekey.h"
19+
#include "direct_access_devicekey/DirectAccessDevicekey.h"
2020
#include "drivers/FlashIAP.h"
2121
#include <string.h>
2222
#include <stdio.h>

storage/TESTS/kvstore/direct_access_devicekey_test/main.cpp renamed to storage/kvstore/direct_access_devicekey/tests/TESTS/direct_access_devicekey/direct_access_devicekey_tdb/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
#include <stdio.h>
2424
#include <string.h>
2525
#include "DeviceKey.h"
26-
#include "KVStore.h"
27-
#include "KVMap.h"
28-
#include "kv_config.h"
29-
#include "TDBStore.h"
26+
#include "kvstore/KVStore.h"
27+
#include "kvstore/KVMap.h"
28+
#include "kv_config/kv_config.h"
29+
#include "kvstore/TDBStore.h"
3030
#include "FlashIAP.h"
3131
#include "FlashIAPBlockDevice.h"
32-
#include "DirectAccessDevicekey.h"
32+
#include "direct_access_devicekey/DirectAccessDevicekey.h"
3333
#include "greentea-client/test_env.h"
3434
#include "unity.h"
3535
#include "utest.h"

0 commit comments

Comments
 (0)