Skip to content

Kvstore tests api change to run on K64F only #9244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.