mirror of https://github.com/ARMmbed/mbed-os.git
Fixed the greentea test dependency and incorporated the review comments
-Added the mbedtls,crypto,psa,filesystem,fat,littlefs in baremetal.json to resolve compiler issue -Disable metrics that are not available for bare metal -Moved the baremetal.json inside TESTS/configs directorypull/11721/head
parent
f402dbb2da
commit
3fc8905315
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"requires": [
|
||||
"bare-metal",
|
||||
"greentea-client",
|
||||
"utest",
|
||||
"unity"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"requires": [
|
||||
"bare-metal",
|
||||
"greentea-client",
|
||||
"utest",
|
||||
"unity",
|
||||
"psa",
|
||||
"mbed-crypto",
|
||||
"mbedtls",
|
||||
"psa-compliance-framework",
|
||||
"filesystem",
|
||||
"littlefs",
|
||||
"mbed-trace",
|
||||
"device-key",
|
||||
"lora"
|
||||
]
|
||||
}
|
|
@ -21,6 +21,10 @@
|
|||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#include "mbed.h"
|
||||
#include "unity/unity.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
/*
|
||||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#include "mbed.h"
|
||||
#include "unity/unity.h"
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#include "mbed.h"
|
||||
#include "FATFileSystem.h"
|
||||
#include "LittleFileSystem.h"
|
||||
|
@ -30,10 +34,6 @@
|
|||
#include "common_defines_test.h"
|
||||
#include "file_test.h"
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#include MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#else
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#include "mbed.h"
|
||||
#include "FATFileSystem.h"
|
||||
#include "LittleFileSystem.h"
|
||||
|
@ -30,10 +34,6 @@
|
|||
#include "common_defines_test.h"
|
||||
#include "file_test.h"
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#include MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#else
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#include "mbed.h"
|
||||
#include "utest/utest.h"
|
||||
#include "unity/unity.h"
|
||||
|
@ -29,10 +33,6 @@
|
|||
#include "download_test.h"
|
||||
#include <string>
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#include MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#else
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#include "mbed.h"
|
||||
#include "utest/utest.h"
|
||||
#include "unity/unity.h"
|
||||
|
@ -29,10 +33,6 @@
|
|||
#include "download_test.h"
|
||||
#include <string>
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#include MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#else
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#include "mbed.h"
|
||||
#include "FATFileSystem.h"
|
||||
#include "LittleFileSystem.h"
|
||||
|
@ -32,9 +36,6 @@
|
|||
#include "file_test.h"
|
||||
#include <string>
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
|
||||
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
#include MBED_CONF_APP_BASICS_TEST_FILENAME
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#include "unity.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
||||
#include "Semaphore.h"
|
||||
|
||||
#include "mbed_trace.h"
|
||||
#define TRACE_GROUP "RTST"
|
||||
|
||||
|
@ -36,6 +34,8 @@
|
|||
#error [NOT_SUPPORTED] Requires parameters from application config file.
|
||||
#endif
|
||||
|
||||
#include "Semaphore.h"
|
||||
|
||||
#if (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)
|
||||
|
||||
using namespace utest::v1;
|
||||
|
|
|
@ -135,9 +135,11 @@ int test_start(test_entry_f test_f, compliance_test_type type)
|
|||
{
|
||||
test_g = test_f;
|
||||
type_g = type;
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
MBED_ASSERT((type > COMPLIANCE_TEST_START) && (type < COMPLIANCE_TEST_END));
|
||||
Thread thread(osPriorityNormal, TEST_STACK_SIZE, NULL);
|
||||
thread.start(main_wrapper);
|
||||
thread.join();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -20,21 +20,7 @@
|
|||
#include "platform/mbed_stats.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#define THREAD_BUF_COUNT 16
|
||||
|
||||
typedef struct {
|
||||
uint32_t entry;
|
||||
uint32_t stack_size;
|
||||
uint32_t max_stack;
|
||||
} thread_info_t;
|
||||
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
|
||||
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT) || !(MBED_CONF_RTOS_PRESENT)
|
||||
#error "RTOS required for Stack stats"
|
||||
#endif
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "rtos/Mutex.h"
|
||||
#include "rtos/Thread.h"
|
||||
|
@ -46,6 +32,14 @@ typedef struct {
|
|||
using namespace mbed;
|
||||
using namespace rtos;
|
||||
|
||||
#define THREAD_BUF_COUNT 16
|
||||
|
||||
typedef struct {
|
||||
uint32_t entry;
|
||||
uint32_t stack_size;
|
||||
uint32_t max_stack;
|
||||
} thread_info_t;
|
||||
|
||||
// Mutex to protect "buf"
|
||||
static SingletonPtr<Mutex> mutex;
|
||||
static char buf[128];
|
||||
|
@ -59,7 +53,7 @@ static void send_CPU_info(void);
|
|||
#if defined(MBED_HEAP_STATS_ENABLED ) && MBED_HEAP_STATS_ENABLED
|
||||
static void send_heap_info(void);
|
||||
#endif
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
|
||||
static void send_stack_info(void);
|
||||
static void on_thread_terminate(osThreadId_t id);
|
||||
static void enqeue_thread_info(osThreadId_t id);
|
||||
|
@ -72,7 +66,7 @@ static uint32_t print_dec(char *buf, uint32_t value);
|
|||
|
||||
void greentea_metrics_setup()
|
||||
{
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
|
||||
Kernel::attach_thread_terminate_hook(on_thread_terminate);
|
||||
#endif
|
||||
}
|
||||
|
@ -82,7 +76,7 @@ void greentea_metrics_report()
|
|||
#if defined(MBED_HEAP_STATS_ENABLED ) && MBED_HEAP_STATS_ENABLED
|
||||
send_heap_info();
|
||||
#endif
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
|
||||
send_stack_info();
|
||||
Kernel::attach_thread_terminate_hook(NULL);
|
||||
#endif
|
||||
|
@ -114,7 +108,7 @@ static void send_heap_info()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
|
||||
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
|
||||
MBED_UNUSED static void send_stack_info()
|
||||
{
|
||||
mutex->lock();
|
||||
|
@ -236,4 +230,3 @@ static uint32_t print_dec(char *buf, uint32_t value)
|
|||
}
|
||||
|
||||
#endif
|
||||
#endif // #if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -67,9 +67,7 @@ static void greentea_write_string(const char *str);
|
|||
* This function is blocking.
|
||||
*/
|
||||
void _GREENTEA_SETUP_COMMON(const int timeout, const char *host_test_name, char *buffer, size_t size) {
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
greentea_metrics_setup();
|
||||
#endif
|
||||
// Key-value protocol handshake function. Waits for {{__sync;...}} message
|
||||
// Sync preamble: "{{__sync;0dad4a9d-59a3-4aec-810d-d5fb09d852c1}}"
|
||||
// Example value of sync_uuid == "0dad4a9d-59a3-4aec-810d-d5fb09d852c1"
|
||||
|
@ -488,9 +486,7 @@ static void greentea_notify_completion(const int result) {
|
|||
__gcov_flush();
|
||||
coverage_report = false;
|
||||
#endif
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
greentea_metrics_report();
|
||||
#endif
|
||||
greentea_send_kv(GREENTEA_TEST_ENV_END, val);
|
||||
greentea_send_kv(GREENTEA_TEST_ENV_EXIT, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue