Fix no block device handling

pull/8430/head
Amir Cohen 2018-10-23 16:41:54 +03:00
parent 7962e0c525
commit 54d2f66aec
2 changed files with 11 additions and 1 deletions

View File

@ -32,7 +32,7 @@ mbed test -m K64F -t ARM -n mbed-os-features-storage-tests-blockdevice-general_b
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

View File

@ -95,6 +95,11 @@ void test_random_program_read_erase()
BlockDevice *block_device = BlockDevice::get_default_instance();
if (!block_device) {
utest_printf("\nno block device found.\n");
return;
}
int err = block_device->init();
TEST_ASSERT_EQUAL(0, err);
@ -164,6 +169,11 @@ void test_multi_threads()
BlockDevice *block_device = BlockDevice::get_default_instance();
if (!block_device) {
utest_printf("\nno block device found.\n");
return;
}
int err = block_device->init();
TEST_ASSERT_EQUAL(0, err);