Skip to content

Commit d20b591

Browse files
authored
Merge pull request #9244 from theamirocohen/kvstore_tests_api
Kvstore tests api change to run on K64F only
2 parents e25611a + 5d19850 commit d20b591

File tree

7 files changed

+30
-46
lines changed

7 files changed

+30
-46
lines changed

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

Lines changed: 2 additions & 2 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

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

Lines changed: 4 additions & 4 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] = {};

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

Lines changed: 4 additions & 4 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] = {};

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

Lines changed: 5 additions & 1 deletion
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

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: 15 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

@@ -95,6 +91,11 @@ static const char *const res_val2 = "This should surely not be saved as the res
9591

9692
static void white_box_test()
9793
{
94+
95+
#if !defined(TARGET_K64F)
96+
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
97+
#endif
98+
9899
bd_params_t bd_params[] = {
99100
{8192, 1, 16, 4096}, // Standard
100101
{4096 * 4, 1, 1, 4096}, // K82F like
@@ -332,6 +333,11 @@ static void white_box_test()
332333

333334
static void multi_set_test()
334335
{
336+
337+
#if !defined(TARGET_K64F)
338+
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
339+
#endif
340+
335341
char *key;
336342
uint8_t *get_buf, *set_buf;
337343
size_t key_size = 32;
@@ -451,6 +457,11 @@ static void multi_set_test()
451457

452458
static void error_inject_test()
453459
{
460+
461+
#if !defined(TARGET_K64F)
462+
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
463+
#endif
464+
454465
char *key;
455466
uint8_t *get_buf, *set_buf, *exists;
456467
size_t key_size = 8;

features/storage/kvstore/mbed_lib.json

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

0 commit comments

Comments
 (0)