mirror of https://github.com/ARMmbed/mbed-os.git
Fix no block device handling
parent
65a4287da2
commit
c87f44e00e
|
@ -32,7 +32,7 @@ mbed test -m K64F -t ARM -n mbed-os-features-storage-tests-blockdevice-general_b
|
||||||
Use `mbed test` again:
|
Use `mbed test` again:
|
||||||
|
|
||||||
```
|
```
|
||||||
mbed test -m K64F -t ARM -n mbed-os-features-storage-tests-blockdevice-general_block_device --run
|
mbed test -m K64F -t ARM -n mbed-os-features-storage-tests-blockdevice-general_block_device --run -v
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Troubleshooting
|
#### Troubleshooting
|
||||||
|
|
|
@ -95,6 +95,11 @@ void test_random_program_read_erase()
|
||||||
|
|
||||||
BlockDevice *block_device = BlockDevice::get_default_instance();
|
BlockDevice *block_device = BlockDevice::get_default_instance();
|
||||||
|
|
||||||
|
if (!block_device) {
|
||||||
|
utest_printf("\nno block device found.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int err = block_device->init();
|
int err = block_device->init();
|
||||||
TEST_ASSERT_EQUAL(0, err);
|
TEST_ASSERT_EQUAL(0, err);
|
||||||
|
|
||||||
|
@ -164,6 +169,11 @@ void test_multi_threads()
|
||||||
|
|
||||||
BlockDevice *block_device = BlockDevice::get_default_instance();
|
BlockDevice *block_device = BlockDevice::get_default_instance();
|
||||||
|
|
||||||
|
if (!block_device) {
|
||||||
|
utest_printf("\nno block device found.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int err = block_device->init();
|
int err = block_device->init();
|
||||||
TEST_ASSERT_EQUAL(0, err);
|
TEST_ASSERT_EQUAL(0, err);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue