Merge pull request #9244 from theamirocohen/kvstore_tests_api

Kvstore tests api change to run on K64F only
pull/9340/head
Martin Kojtal 2019-01-10 13:48:31 +00:00 committed by GitHub
commit d20b59153a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 46 deletions

View File

@ -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

View File

@ -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] = {};

View File

@ -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] = {};

View File

@ -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

View File

@ -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;

View File

@ -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;
@ -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
@ -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;
@ -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;

View File

@ -1,27 +0,0 @@
{
"name": "kvstore",
"config": {
"enabled": {
"macro_name": "KVSTORE_ENABLED",
"value": true,
"help": "Enabled"
}
},
"target_overrides": {
"REALTEK_RTL8195AM": {
"enabled": false
},
"NRF51_DK": {
"enabled": false
},
"KL82Z": {
"enabled": false
},
"USENSE": {
"enabled": false
},
"NCS36510": {
"enabled": false
}
}
}