Merge pull request #13307 from rajkan01/storage_kv_dir_resturcture

Restructure storage kvstore directory
pull/13314/head
Martin Kojtal 2020-07-23 15:59:07 +01:00 committed by GitHub
commit 1d9c13ed5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 51 additions and 71 deletions

View File

@ -27,3 +27,4 @@
^tools
^UNITTESTS
^storage/blockdevice/tests/UNITTESTS
^storage/kvstore/tests/UNITTESTS

View File

@ -22,15 +22,12 @@
"network-emac",
"flashiap-block-device",
"system-storage",
"filesystemstore",
"SecureStore",
"storage",
"kv-map",
"kv-global-api",
"direct-access-devicekey",
"tdbstore",
"kv-config",
"events",
"kv-global-api",
"sd",
"qspif",
"spif-driver",

View File

@ -118,6 +118,9 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include"
"${PROJECT_SOURCE_DIR}/../storage/blockdevice/include"
"${PROJECT_SOURCE_DIR}/../storage/filesystem/include"
"${PROJECT_SOURCE_DIR}/../storage/kvstore/include"
"${PROJECT_SOURCE_DIR}/../storage/kvstore/kv_config"
"${PROJECT_SOURCE_DIR}/../storage/kvstore/kv_config/include"
"${PROJECT_SOURCE_DIR}/../drivers"
"${PROJECT_SOURCE_DIR}/../hal"
"${PROJECT_SOURCE_DIR}/../events"
@ -146,7 +149,6 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/../features/lorawan/system"
"${PROJECT_SOURCE_DIR}/../features/mbedtls"
"${PROJECT_SOURCE_DIR}/../features/mbedtls/inc"
"${PROJECT_SOURCE_DIR}/../storage/kvstore/conf"
)
# Create a list for test suites.

View File

@ -12,13 +12,6 @@ set(unittest-includes ${unittest-includes}
)
set(unittest-sources
../storage/kvstore/global_api/kvstore_global_api.cpp
../storage/kvstore/securestore/SecureStore.cpp
../storage/kvstore/kv_map/KVMap.cpp
../storage/kvstore/tdbstore/TDBStore.cpp
../storage/kvstore/direct_access_devicekey/DirectAccessDevicekey.cpp
../storage/kvstore/conf/kv_config.cpp
../storage/kvstore/filesystemstore/FileSystemStore.cpp
../storage/system_storage/SystemStorage.cpp
)

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "storage/kvstore/conf/kv_config.h"
#include "kv_config/kv_config.h"
const char *get_filesystemstore_folder_path()
{

View File

@ -6,7 +6,7 @@
"mbedtls",
"storage",
"flashiap-block-device",
"tdbstore",
"kv-global-api",
"storage_tdb_internal"
]
}

View File

@ -19,10 +19,10 @@
#if DEVICEKEY_ENABLED
#include "mbedtls/cmac.h"
#include "mbedtls/platform.h"
#include "storage/kvstore/include/KVStore.h"
#include "storage/kvstore/tdbstore/TDBStore.h"
#include "storage/kvstore/kv_map/KVMap.h"
#include "storage/kvstore/conf/kv_config.h"
#include "kvstore/KVStore.h"
#include "kvstore/TDBStore.h"
#include "kvstore/KVMap.h"
#include "kv_config/kv_config.h"
#include "mbed_wait_api.h"
#include <stdlib.h>
#include "platform/mbed_error.h"

View File

@ -16,7 +16,7 @@
// ----------------------------------------------------------- Includes -----------------------------------------------------------
#if DEVICE_FLASH
#include "DirectAccessDevicekey.h"
#include "direct_access_devicekey/DirectAccessDevicekey.h"
#include "drivers/FlashIAP.h"
#include <string.h>
#include <stdio.h>

View File

@ -23,13 +23,13 @@
#include <stdio.h>
#include <string.h>
#include "DeviceKey.h"
#include "KVStore.h"
#include "KVMap.h"
#include "kv_config.h"
#include "TDBStore.h"
#include "kvstore/KVStore.h"
#include "kvstore/KVMap.h"
#include "kv_config/kv_config.h"
#include "kvstore/TDBStore.h"
#include "FlashIAP.h"
#include "FlashIAPBlockDevice.h"
#include "DirectAccessDevicekey.h"
#include "direct_access_devicekey/DirectAccessDevicekey.h"
#include "greentea-client/test_env.h"
#include "unity.h"
#include "utest.h"

View File

@ -1,3 +0,0 @@
{
"name": "filesystemstore"
}

View File

@ -18,7 +18,7 @@
#ifndef MBED_FILE_SYSTEM_STORE_H
#define MBED_FILE_SYSTEM_STORE_H
#include "storage/kvstore/include/KVStore.h"
#include "kvstore/KVStore.h"
#include "filesystem/FileSystem.h"
namespace mbed {

View File

@ -16,7 +16,7 @@
#ifndef _KV_MAP
#define _KV_MAP
#include "storage/kvstore/include/KVStore.h"
#include "kvstore/KVStore.h"
#include "platform/PlatformMutex.h"
#include "platform/SingletonPtr.h"
#include "blockdevice/BlockDevice.h"

View File

@ -19,7 +19,7 @@
#include <stdint.h>
#include <stdio.h>
#include "storage/kvstore/include/KVStore.h"
#include "kvstore/KVStore.h"
#include "blockdevice/BlockDevice.h"
#include "blockdevice/BufferedBlockDevice.h"
#include "PlatformMutex.h"

View File

@ -15,20 +15,20 @@
*/
#include "kv_config.h"
#include "storage/kvstore/include/KVStore.h"
#include "storage/kvstore/kv_map/KVMap.h"
#include "kvstore/KVStore.h"
#include "kvstore/KVMap.h"
#include "blockdevice/BlockDevice.h"
#include "filesystem/FileSystem.h"
#include "storage/kvstore/filesystemstore/FileSystemStore.h"
#include "kvstore/FileSystemStore.h"
#include "blockdevice/SlicingBlockDevice.h"
#include "fat/FATFileSystem.h"
#include "littlefs/LittleFileSystem.h"
#include "storage/kvstore/tdbstore/TDBStore.h"
#include "kvstore/TDBStore.h"
#include "mbed_error.h"
#include "drivers/FlashIAP.h"
#include "blockdevice/FlashSimBlockDevice.h"
#include "mbed_trace.h"
#include "storage/kvstore/securestore/SecureStore.h"
#include "securestore/SecureStore.h"
#define TRACE_GROUP "KVCFG"
#if COMPONENT_FLASHIAP

View File

@ -1,3 +0,0 @@
{
"name": "kv-map"
}

View File

@ -16,7 +16,7 @@
// ----------------------------------------------------------- Includes -----------------------------------------------------------
#include "SecureStore.h"
#include "securestore/SecureStore.h"
#if SECURESTORE_ENABLED

View File

@ -16,8 +16,8 @@
* limitations under the License.
*/
#include "SecureStore.h"
#include "TDBStore.h"
#include "securestore/SecureStore.h"
#include "kvstore/TDBStore.h"
#ifdef MBED_CONF_RTOS_PRESENT
#include "Thread.h"
#endif

View File

@ -16,8 +16,8 @@
* limitations under the License.
*/
#include "FileSystemStore.h"
#include "storage/kvstore/conf/kv_config.h"
#include "kvstore/FileSystemStore.h"
#include "kv_config/kv_config.h"
#include "filesystem/Dir.h"
#include "filesystem/File.h"
#include "blockdevice/BlockDevice.h"
@ -635,6 +635,3 @@ static char *string_ndup(const char *src, size_t size)
string_copy[size] = '\0';
return string_copy;
}

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
#include "storage/kvstore/include/KVStore.h"
#include "storage/kvstore/kv_map/KVMap.h"
#include "storage/kvstore/conf/kv_config.h"
#include "kvstore/KVStore.h"
#include "kvstore/KVMap.h"
#include "kv_config/kv_config.h"
#include <stdlib.h>
#include "string.h"
#include "mbed_error.h"
@ -333,4 +333,3 @@ FileSystem *KVMap::get_external_filesystem_instance(const char *name)
}
} // namespace mbed

View File

@ -16,7 +16,7 @@
// ----------------------------------------------------------- Includes -----------------------------------------------------------
#include "TDBStore.h"
#include "kvstore/TDBStore.h"
#include <algorithm>
#include <string.h>

View File

@ -15,9 +15,9 @@
*/
#include "kvstore_global_api.h"
#include "storage/kvstore/conf/kv_config.h"
#include "storage/kvstore/kv_map/KVMap.h"
#include "storage/kvstore/include/KVStore.h"
#include "kv_config/kv_config.h"
#include "kvstore/KVMap.h"
#include "kvstore/KVStore.h"
#include "mbed_error.h"
using namespace mbed;
@ -201,4 +201,3 @@ int kv_reset(const char *kvstore_name)
return ret;
}

View File

@ -1,3 +0,0 @@
{
"name": "tdbstore"
}

View File

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "SecureStore.h"
#include "TDBStore.h"
#include "securestore/SecureStore.h"
#include "kvstore/TDBStore.h"
#ifdef MBED_CONF_RTOS_PRESENT
#include "Thread.h"
#endif

View File

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "SecureStore.h"
#include "TDBStore.h"
#include "securestore/SecureStore.h"
#include "kvstore/TDBStore.h"
#include "mbed_error.h"
#include "FlashSimBlockDevice.h"
#include "SlicingBlockDevice.h"

View File

@ -0,0 +1 @@
*

View File

@ -16,7 +16,7 @@
#include "gtest/gtest.h"
#include "blockdevice/HeapBlockDevice.h"
#include "storage/kvstore/filesystemstore/FileSystemStore.h"
#include "kvstore/FileSystemStore.h"
#include "littlefs/LittleFileSystem.h"
#include "mbed_error.h"
#include <stdlib.h>

View File

@ -10,7 +10,7 @@ set(unittest-includes ${unittest-includes}
set(unittest-sources
../storage/blockdevice/source/HeapBlockDevice.cpp
../storage/kvstore/filesystemstore/FileSystemStore.cpp
../storage/kvstore/source/FileSystemStore.cpp
../storage/filesystem/littlefs/source/LittleFileSystem.cpp
../storage/filesystem/source/Dir.cpp
../storage/filesystem/source/File.cpp
@ -24,7 +24,7 @@ set(unittest-sources
)
set(unittest-test-sources
moduletests/storage/kvstore/FileSystemStore/moduletest.cpp
${CMAKE_CURRENT_LIST_DIR}/moduletest.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_assert_stub.cpp
stubs/mbed_error.c

View File

@ -17,7 +17,7 @@
#include "gtest/gtest.h"
#include "blockdevice/HeapBlockDevice.h"
#include "blockdevice/FlashSimBlockDevice.h"
#include "storage/kvstore/tdbstore/TDBStore.h"
#include "kvstore/TDBStore.h"
#include <stdlib.h>
#define BLOCK_SIZE (512)

View File

@ -13,7 +13,7 @@ set(unittest-sources
../storage/blockdevice/source/FlashSimBlockDevice.cpp
../storage/blockdevice/source/HeapBlockDevice.cpp
../storage/blockdevice/source/BufferedBlockDevice.cpp
../storage/kvstore/tdbstore/TDBStore.cpp
../storage/kvstore/source/TDBStore.cpp
../features/frameworks/mbed-trace/source/mbed_trace.c
stubs/mbed_atomic_stub.c
stubs/mbed_assert_stub.cpp
@ -21,7 +21,7 @@ set(unittest-sources
)
set(unittest-test-sources
moduletests/storage/kvstore/TDBStore/moduletest.cpp
${CMAKE_CURRENT_LIST_DIR}/moduletest.cpp
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")