mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13273 from rajkan01/storage_rb_dir_restructure
Restructure storage blockdevice directorypull/13300/head
commit
ca2f980661
|
|
@ -28,3 +28,4 @@
|
|||
^TESTS/mbed_hal/trng/pithy
|
||||
^tools
|
||||
^UNITTESTS
|
||||
^storage/blockdevice/tests/UNITTESTS
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ set(unittest-includes-base
|
|||
"${PROJECT_SOURCE_DIR}/../features"
|
||||
"${PROJECT_SOURCE_DIR}/../features/netsocket"
|
||||
"${PROJECT_SOURCE_DIR}/../platform"
|
||||
"${PROJECT_SOURCE_DIR}/../storage"
|
||||
"${PROJECT_SOURCE_DIR}/../storage/blockdevice/include"
|
||||
"${PROJECT_SOURCE_DIR}/../drivers"
|
||||
"${PROJECT_SOURCE_DIR}/../hal"
|
||||
"${PROJECT_SOURCE_DIR}/../events"
|
||||
|
|
|
|||
|
|
@ -12,13 +12,6 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../features/device_key/source/DeviceKey.cpp
|
||||
../storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp
|
||||
../storage/blockdevice/COMPONENT_I2CEE/I2CEEBlockDevice.cpp
|
||||
../storage/blockdevice/COMPONENT_DATAFLASH/DataFlashBlockDevice.cpp
|
||||
../storage/blockdevice/COMPONENT_FLASHIAP/FlashIAPBlockDevice.cpp
|
||||
../storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp
|
||||
../storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp
|
||||
../storage/filesystem/Dir.cpp
|
||||
../storage/filesystem/FileSystem.cpp
|
||||
../storage/filesystem/File.cpp
|
||||
|
|
@ -30,16 +23,6 @@ set(unittest-sources
|
|||
../storage/kvstore/conf/kv_config.cpp
|
||||
../storage/kvstore/filesystemstore/FileSystemStore.cpp
|
||||
../storage/system_storage/SystemStorage.cpp
|
||||
../storage/blockdevice/ChainingBlockDevice.cpp
|
||||
../storage/blockdevice/ReadOnlyBlockDevice.cpp
|
||||
../storage/blockdevice/SlicingBlockDevice.cpp
|
||||
../storage/blockdevice/MBRBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/FlashSimBlockDevice.cpp
|
||||
../storage/blockdevice/ObservingBlockDevice.cpp
|
||||
../storage/blockdevice/ProfilingBlockDevice.cpp
|
||||
../storage/blockdevice/BufferedBlockDevice.cpp
|
||||
../storage/blockdevice/ExhaustibleBlockDevice.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/HeapBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
#include "storage/kvstore/filesystemstore/FileSystemStore.h"
|
||||
#include "storage/filesystem/littlefs/LittleFileSystem.h"
|
||||
#include "mbed_error.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
../storage/kvstore/filesystemstore/FileSystemStore.cpp
|
||||
../storage/filesystem/littlefs/LittleFileSystem.cpp
|
||||
../storage/filesystem/Dir.cpp
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/HeapBlockDevice.h"
|
||||
#include "storage/blockdevice/FlashSimBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
#include "blockdevice/FlashSimBlockDevice.h"
|
||||
#include "storage/kvstore/tdbstore/TDBStore.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/FlashSimBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/BufferedBlockDevice.cpp
|
||||
../storage/blockdevice/source/FlashSimBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/BufferedBlockDevice.cpp
|
||||
../storage/kvstore/tdbstore/TDBStore.cpp
|
||||
../features/frameworks/mbed-trace/source/mbed_trace.c
|
||||
stubs/mbed_atomic_stub.c
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
####################
|
||||
# UNIT TESTS
|
||||
####################
|
||||
|
||||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ChainingBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ChainingBlockDevice/test_ChainingBlockDevice.cpp
|
||||
)
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
|
||||
class BlockDeviceMock : public BlockDevice {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef EMULATEDSD_H
|
||||
#define EMULATEDSD_H
|
||||
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
|
||||
class EmulatedSD_Private;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "platform/Callback.h"
|
||||
|
||||
namespace mbed {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "platform/PlatformMutex.h"
|
||||
#include "PinNames.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "drivers/SPI.h"
|
||||
#include "drivers/DigitalOut.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#if DEVICE_FLASH
|
||||
|
||||
#include "FlashIAP.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "platform/mbed_toolchain.h"
|
||||
|
||||
/** BlockDevice using the FlashIAP API
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef MBED_I2CEEPROM_BLOCK_DEVICE_H
|
||||
#define MBED_I2CEEPROM_BLOCK_DEVICE_H
|
||||
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "drivers/I2C.h"
|
||||
|
||||
/** BlockDevice for I2C based flash device such as
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "drivers/QSPI.h"
|
||||
#include "drivers/internal/SFDP.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "platform/Callback.h"
|
||||
|
||||
#ifndef MBED_CONF_QSPIF_QSPI_IO0
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
/* If the target has no SPI support, then SD Card is not supported. */
|
||||
#if DEVICE_SPI
|
||||
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "drivers/SPI.h"
|
||||
#include "drivers/Timer.h"
|
||||
#include "drivers/MbedCRC.h"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "drivers/SPI.h"
|
||||
#include "drivers/DigitalOut.h"
|
||||
#include "drivers/internal/SFDP.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
|
||||
#ifndef MBED_CONF_SPIF_DRIVER_SPI_MOSI
|
||||
#define MBED_CONF_SPIF_DRIVER_SPI_MOSI NC
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "BufferedBlockDevice.h"
|
||||
#include "blockdevice/BufferedBlockDevice.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
#include "platform/mbed_atomic.h"
|
||||
#include <algorithm>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ChainingBlockDevice.h"
|
||||
#include "blockdevice/ChainingBlockDevice.h"
|
||||
#include "platform/mbed_atomic.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ExhaustibleBlockDevice.h"
|
||||
#include "blockdevice/ExhaustibleBlockDevice.h"
|
||||
#include "platform/mbed_atomic.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
|
||||
|
|
@ -209,4 +209,3 @@ const char *ExhaustibleBlockDevice::get_type() const
|
|||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "FlashSimBlockDevice.h"
|
||||
#include "blockdevice/FlashSimBlockDevice.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
#include "platform/mbed_atomic.h"
|
||||
#include <algorithm>
|
||||
|
|
@ -230,4 +230,3 @@ const char *FlashSimBlockDevice::get_type() const
|
|||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "HeapBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
#include "platform/mbed_atomic.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "MBRBlockDevice.h"
|
||||
#include "blockdevice/MBRBlockDevice.h"
|
||||
#include "platform/mbed_atomic.h"
|
||||
#include "platform/mbed_toolchain.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
|
|
@ -453,4 +453,3 @@ const char *MBRBlockDevice::get_type() const
|
|||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "ObservingBlockDevice.h"
|
||||
#include "ReadOnlyBlockDevice.h"
|
||||
#include "blockdevice/ObservingBlockDevice.h"
|
||||
#include "blockdevice/ReadOnlyBlockDevice.h"
|
||||
|
||||
namespace mbed {
|
||||
|
||||
|
|
@ -121,4 +121,3 @@ const char *ObservingBlockDevice::get_type() const
|
|||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ProfilingBlockDevice.h"
|
||||
#include "blockdevice/ProfilingBlockDevice.h"
|
||||
#include "stddef.h"
|
||||
|
||||
namespace mbed {
|
||||
|
|
@ -131,4 +131,3 @@ const char *ProfilingBlockDevice::get_type() const
|
|||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
/** \addtogroup storage */
|
||||
/** @{*/
|
||||
|
||||
#include "ReadOnlyBlockDevice.h"
|
||||
#include "blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "platform/mbed_error.h"
|
||||
|
||||
namespace mbed {
|
||||
|
|
@ -111,5 +111,3 @@ const char *ReadOnlyBlockDevice::get_type() const
|
|||
} // namespace mbed
|
||||
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "SlicingBlockDevice.h"
|
||||
#include "blockdevice/SlicingBlockDevice.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
#include "stddef.h"
|
||||
#include <stdio.h>
|
||||
|
|
@ -192,4 +192,3 @@ int main()
|
|||
{
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ Use `mbed test` again:
|
|||
```
|
||||
mbed test -m K64F -t ARM -n mbed-os-features-storage-tests-blockdevice-general_block_device --run -v
|
||||
```
|
||||
|
||||
|
||||
#### Troubleshooting
|
||||
|
||||
Please review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions about how to fix possible issues you may face.
|
||||
|
|
@ -0,0 +1 @@
|
|||
*
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/BufferedBlockDevice.h"
|
||||
#include "blockdevice/BufferedBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
using ::testing::_;
|
||||
|
|
@ -9,12 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/BufferedBlockDevice.cpp
|
||||
../storage/blockdevice/source/BufferedBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/BufferedBlockDevice/test_BufferedBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_BufferedBlockDevice.cpp
|
||||
stubs/BlockDevice_mock.h
|
||||
)
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/ChainingBlockDevice.cpp"
|
||||
#include "ChainingBlockDevice.cpp"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
using ::testing::_;
|
||||
|
|
@ -160,4 +160,3 @@ TEST_F(ChainingBlockModuleTest, memory_overlap)
|
|||
|
||||
EXPECT_EQ(bd.erase((SECTORS_NUM / 2 - 2) * BLOCK_SIZE, 4 * BLOCK_SIZE), BD_ERROR_OK);
|
||||
}
|
||||
|
||||
|
|
@ -6,15 +6,16 @@
|
|||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
../storage/blockdevice/source
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/SlicingBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/ChainingBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
moduletests/storage/blockdevice/SlicingBlockDevice/moduletest.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ChainingBlockDevice.cpp
|
||||
)
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/ExhaustibleBlockDevice.h"
|
||||
#include "blockdevice/ExhaustibleBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
|
|
@ -9,11 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/FlashSimBlockDevice.cpp
|
||||
../storage/blockdevice/source/ExhaustibleBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/FlashSimBlockDevice/test_FlashSimBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ExhaustibleBlockDevice.cpp
|
||||
)
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/FlashSimBlockDevice.h"
|
||||
#include "blockdevice/FlashSimBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
|
|
@ -9,11 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ExhaustibleBlockDevice.cpp
|
||||
../storage/blockdevice/source/FlashSimBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ExhaustibleBlockDevice/test_ExhaustibleBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_FlashSimBlockDevice.cpp
|
||||
)
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/HeapBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
#include <string.h>
|
||||
#include "mbed_assert.h"
|
||||
|
||||
|
|
@ -6,16 +6,17 @@
|
|||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
../storage/blockdevice/include
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/HeapBlockDevice/test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-flags
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/MBRBlockDevice.h"
|
||||
#include "blockdevice/MBRBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
|
|
@ -9,11 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/MBRBlockDevice.cpp
|
||||
../storage/blockdevice/source/MBRBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/MBRBlockDevice/test_MBRBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_MBRBlockDevice.cpp
|
||||
)
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/ObservingBlockDevice.h"
|
||||
#include "storage/blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "blockdevice/ObservingBlockDevice.h"
|
||||
#include "blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
using ::testing::_;
|
||||
|
|
@ -9,14 +9,14 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ObservingBlockDevice.cpp
|
||||
../storage/blockdevice/ReadOnlyBlockDevice.cpp
|
||||
../storage/blockdevice/source/ObservingBlockDevice.cpp
|
||||
../storage/blockdevice/source/ReadOnlyBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
stubs/mbed_error.c
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ObservingBlockDevice/test_ObservingBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ObservingBlockDevice.cpp
|
||||
stubs/BlockDevice_mock.h
|
||||
)
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
#include "storage/blockdevice/ProfilingBlockDevice.h"
|
||||
#include "blockdevice/ProfilingBlockDevice.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
#define DEVICE_SIZE (BLOCK_SIZE*10)
|
||||
|
|
@ -9,13 +9,13 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ProfilingBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/ProfilingBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ProfilingBlockDevice/test_ProfilingBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ProfilingBlockDevice.cpp
|
||||
stubs/mbed_error.c
|
||||
)
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
#include "storage/blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "platform/mbed_error.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
|
|
@ -9,13 +9,13 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ReadOnlyBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/ReadOnlyBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ReadOnlyBlockDevice/test_ReadOnlyBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ReadOnlyBlockDevice.cpp
|
||||
stubs/mbed_error.c
|
||||
)
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/HeapBlockDevice.h"
|
||||
#include "storage/blockdevice/SlicingBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
#include "blockdevice/SlicingBlockDevice.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
#define DEVICE_SIZE (BLOCK_SIZE*10)
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
####################
|
||||
# UNIT TESTS
|
||||
####################
|
||||
|
||||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/source/SlicingBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
${CMAKE_CURRENT_LIST_DIR}/moduletest.cpp
|
||||
)
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#include "platform/FileHandle.h"
|
||||
#include "platform/DirHandle.h"
|
||||
#include "platform/FileSystemLike.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
|
||||
namespace mbed {
|
||||
/** \addtogroup file system */
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#define MBED_FATFILESYSTEM_H
|
||||
|
||||
#include "storage/filesystem/FileSystem.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "FileHandle.h"
|
||||
#include <stdint.h>
|
||||
#include "PlatformMutex.h"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#define MBED_LFSFILESYSTEM_H
|
||||
|
||||
#include "storage/filesystem/FileSystem.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "platform/PlatformMutex.h"
|
||||
#include "storage/filesystem/littlefs/littlefs/lfs.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@
|
|||
#include "storage/filesystem/Dir.h"
|
||||
|
||||
// BlockDevice classes
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "storage/blockdevice/ChainingBlockDevice.h"
|
||||
#include "storage/blockdevice/SlicingBlockDevice.h"
|
||||
#include "storage/blockdevice/HeapBlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/ChainingBlockDevice.h"
|
||||
#include "blockdevice/SlicingBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
|
||||
/** @}*/
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,16 +17,16 @@
|
|||
#include "kv_config.h"
|
||||
#include "storage/kvstore/include/KVStore.h"
|
||||
#include "storage/kvstore/kv_map/KVMap.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "storage/filesystem/FileSystem.h"
|
||||
#include "storage/kvstore/filesystemstore/FileSystemStore.h"
|
||||
#include "storage/blockdevice/SlicingBlockDevice.h"
|
||||
#include "blockdevice/SlicingBlockDevice.h"
|
||||
#include "storage/filesystem/fat/FATFileSystem.h"
|
||||
#include "storage/filesystem/littlefs/LittleFileSystem.h"
|
||||
#include "storage/kvstore/tdbstore/TDBStore.h"
|
||||
#include "mbed_error.h"
|
||||
#include "drivers/FlashIAP.h"
|
||||
#include "storage/blockdevice/FlashSimBlockDevice.h"
|
||||
#include "blockdevice/FlashSimBlockDevice.h"
|
||||
#include "mbed_trace.h"
|
||||
#include "storage/kvstore/securestore/SecureStore.h"
|
||||
#define TRACE_GROUP "KVCFG"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#ifndef _KV_CONFIG
|
||||
#define _KV_CONFIG
|
||||
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include "storage/kvstore/conf/kv_config.h"
|
||||
#include "storage/filesystem/Dir.h"
|
||||
#include "storage/filesystem/File.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "mbed_error.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include "storage/kvstore/include/KVStore.h"
|
||||
#include "platform/PlatformMutex.h"
|
||||
#include "platform/SingletonPtr.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "storage/filesystem/FileSystem.h"
|
||||
|
||||
namespace mbed {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "storage/kvstore/include/KVStore.h"
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "storage/blockdevice/BufferedBlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BufferedBlockDevice.h"
|
||||
#include "PlatformMutex.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "storage/blockdevice/BlockDevice.h"
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
#include "storage/filesystem/FileSystem.h"
|
||||
#include "storage/filesystem/fat/FATFileSystem.h"
|
||||
#include "storage/filesystem/littlefs/LittleFileSystem.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue