Skip to content

Commit

Permalink
Merge pull request #9244 from theamirocohen/kvstore_tests_api
Browse files Browse the repository at this point in the history
Kvstore tests api change to run on K64F only
  • Loading branch information
0xc0170 committed Jan 10, 2019
2 parents e25611a + 5d19850 commit d20b591
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 46 deletions.
4 changes: 2 additions & 2 deletions features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp
Expand Up @@ -27,8 +27,8 @@
#include "utest.h"
#include <stdlib.h>

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

#define FSST_TEST_NUM_OF_THREADS 5
Expand Down
8 changes: 4 additions & 4 deletions features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp
Expand Up @@ -26,13 +26,13 @@
#include "utest/utest.h"
#include "FileSystemStore.h"

#if !KVSTORE_ENABLED
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
#endif

using namespace utest::v1;
using namespace mbed;

#if !defined(TARGET_K64F)
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices
#endif

static const char data[] = "data";
static const char key[] = "key";
static char buffer[20] = {};
Expand Down
8 changes: 4 additions & 4 deletions features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp
Expand Up @@ -26,13 +26,13 @@
#include "utest/utest.h"
#include "FileSystemStore.h"

#if !KVSTORE_ENABLED
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
#endif

using namespace utest::v1;
using namespace mbed;

#if !defined(TARGET_K64F)
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices
#endif

static const char data[] = "data";
static const char key[] = "key";
static char buffer[20] = {};
Expand Down
6 changes: 5 additions & 1 deletion features/storage/TESTS/kvstore/securestore_whitebox/main.cpp
Expand Up @@ -34,7 +34,11 @@
#include <stdio.h>
#include <algorithm>

#if !SECURESTORE_ENABLED || !KVSTORE_ENABLED
#if !defined(TARGET_K64F)
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices
#endif

#if !SECURESTORE_ENABLED
#error [NOT_SUPPORTED] KVStore & SecureStore need to be enabled for this test
#endif

Expand Down
4 changes: 0 additions & 4 deletions features/storage/TESTS/kvstore/static_tests/main.cpp
Expand Up @@ -22,10 +22,6 @@
#include "utest/utest.h"
#include "kvstore_global_api.h"

#if !KVSTORE_ENABLED
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
#endif

using namespace utest::v1;
using namespace mbed;

Expand Down
19 changes: 15 additions & 4 deletions features/storage/TESTS/kvstore/tdbstore_whitebox/main.cpp
Expand Up @@ -33,10 +33,6 @@
#include <stdio.h>
#include <algorithm>

#if !KVSTORE_ENABLED
#error [NOT_SUPPORTED] KVStore needs to be enabled for this test
#endif

using namespace mbed;
using namespace utest::v1;

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

static void white_box_test()
{

#if !defined(TARGET_K64F)
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
#endif

bd_params_t bd_params[] = {
{8192, 1, 16, 4096}, // Standard
{4096 * 4, 1, 1, 4096}, // K82F like
Expand Down Expand Up @@ -332,6 +333,11 @@ static void white_box_test()

static void multi_set_test()
{

#if !defined(TARGET_K64F)
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
#endif

char *key;
uint8_t *get_buf, *set_buf;
size_t key_size = 32;
Expand Down Expand Up @@ -451,6 +457,11 @@ static void multi_set_test()

static void error_inject_test()
{

#if !defined(TARGET_K64F)
TEST_SKIP_MESSAGE("Kvstore API tests run only on K64F devices");
#endif

char *key;
uint8_t *get_buf, *set_buf, *exists;
size_t key_size = 8;
Expand Down
27 changes: 0 additions & 27 deletions features/storage/kvstore/mbed_lib.json

This file was deleted.

0 comments on commit d20b591

Please sign in to comment.