Skip to content

Commit 5d19850

Browse files
author
David Saada
committed
Remove kvstore's mbed_lib.json file (not relevant any more)
In addition, use the NOT_SUPPORTED directive to skip the tests.
1 parent 9a5841a commit 5d19850

File tree

7 files changed

+16
-66
lines changed

7 files changed

+16
-66
lines changed

features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include "utest.h"
2828
#include <stdlib.h>
2929

30-
#if !KVSTORE_ENABLED
31-
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
30+
#if !defined(TARGET_K64F)
31+
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices
3232
#endif
3333

3434
#define FSST_TEST_NUM_OF_THREADS 5
@@ -38,11 +38,7 @@ static const int heap_alloc_threshold_size = 4096;
3838
using namespace utest::v1;
3939
using namespace mbed;
4040

41-
BlockDevice *bd = NULL;
42-
43-
#if defined(TARGET_K64F)
44-
bd = BlockDevice::get_default_instance();
45-
#endif
41+
BlockDevice *bd = BlockDevice::get_default_instance();
4642

4743
typedef struct {
4844
int thread_num;

features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
#include "utest/utest.h"
2727
#include "FileSystemStore.h"
2828

29-
#if !KVSTORE_ENABLED
30-
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
31-
#endif
32-
3329
using namespace utest::v1;
3430
using namespace mbed;
3531

32+
#if !defined(TARGET_K64F)
33+
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices
34+
#endif
35+
3636
static const char data[] = "data";
3737
static const char key[] = "key";
3838
static char buffer[20] = {};
@@ -73,11 +73,6 @@ static const int heap_alloc_threshold_size = 4096;
7373
//init the blockdevice
7474
static void kvstore_init()
7575
{
76-
77-
#if !defined(TARGET_K64F)
78-
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
79-
#endif
80-
8176
int res;
8277

8378
res = bd->init();

features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
#include "utest/utest.h"
2727
#include "FileSystemStore.h"
2828

29-
#if !KVSTORE_ENABLED
30-
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
31-
#endif
32-
3329
using namespace utest::v1;
3430
using namespace mbed;
3531

32+
#if !defined(TARGET_K64F)
33+
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices
34+
#endif
35+
3636
static const char data[] = "data";
3737
static const char key[] = "key";
3838
static char buffer[20] = {};
@@ -73,11 +73,6 @@ static const int heap_alloc_threshold_size = 4096;
7373
//init the blockdevice
7474
static void kvstore_init()
7575
{
76-
77-
#if !defined(TARGET_K64F)
78-
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
79-
#endif
80-
8176
int res;
8277

8378
res = bd->init();

features/storage/TESTS/kvstore/securestore_whitebox/main.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
#include <stdio.h>
3535
#include <algorithm>
3636

37-
#if !SECURESTORE_ENABLED || !KVSTORE_ENABLED
37+
#if !defined(TARGET_K64F)
38+
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices
39+
#endif
40+
41+
#if !SECURESTORE_ENABLED
3842
#error [NOT_SUPPORTED] KVStore & SecureStore need to be enabled for this test
3943
#endif
4044

@@ -92,11 +96,6 @@ static const char *const key7_val1 = "7 is a lucky number";
9296

9397
static void white_box_test()
9498
{
95-
96-
#if !defined(TARGET_K64F)
97-
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
98-
#endif
99-
10099
uint8_t get_buf[256];
101100
size_t actual_data_size;
102101
int result;

features/storage/TESTS/kvstore/static_tests/main.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
#include "utest/utest.h"
2323
#include "kvstore_global_api.h"
2424

25-
#if !KVSTORE_ENABLED
26-
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
27-
#endif
28-
2925
using namespace utest::v1;
3026
using namespace mbed;
3127

features/storage/TESTS/kvstore/tdbstore_whitebox/main.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
#include <stdio.h>
3434
#include <algorithm>
3535

36-
#if !KVSTORE_ENABLED
37-
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
38-
#endif
39-
4036
using namespace mbed;
4137
using namespace utest::v1;
4238

features/storage/kvstore/mbed_lib.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)