Skip to content

Commit 1b5cfbc

Browse files
committed
Incorporated the review comments
-Disable metrics that are not available for bare metal -Moved the baremetal.json inside TESTS/configs directory
1 parent 1f98bbe commit 1b5cfbc

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed
File renamed without changes.

features/frameworks/greentea-client/source/greentea_metrics.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include "platform/mbed_stats.h"
2121
#include <stdint.h>
2222

23-
#if defined(MBED_CONF_RTOS_PRESENT)
24-
2523
#define THREAD_BUF_COUNT 16
2624

2725
typedef struct {
@@ -72,7 +70,7 @@ static uint32_t print_dec(char *buf, uint32_t value);
7270

7371
void greentea_metrics_setup()
7472
{
75-
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
73+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
7674
Kernel::attach_thread_terminate_hook(on_thread_terminate);
7775
#endif
7876
}
@@ -82,7 +80,7 @@ void greentea_metrics_report()
8280
#if defined(MBED_HEAP_STATS_ENABLED ) && MBED_HEAP_STATS_ENABLED
8381
send_heap_info();
8482
#endif
85-
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
83+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
8684
send_stack_info();
8785
Kernel::attach_thread_terminate_hook(NULL);
8886
#endif
@@ -114,7 +112,7 @@ static void send_heap_info()
114112
}
115113
#endif
116114

117-
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
115+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED && defined(MBED_CONF_RTOS_PRESENT)
118116
MBED_UNUSED static void send_stack_info()
119117
{
120118
mutex->lock();
@@ -236,4 +234,3 @@ static uint32_t print_dec(char *buf, uint32_t value)
236234
}
237235

238236
#endif
239-
#endif // #if defined(MBED_CONF_RTOS_PRESENT)

features/frameworks/greentea-client/source/greentea_test_env.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ static void greentea_write_string(const char *str);
6767
* This function is blocking.
6868
*/
6969
void _GREENTEA_SETUP_COMMON(const int timeout, const char *host_test_name, char *buffer, size_t size) {
70-
#if defined(MBED_CONF_RTOS_PRESENT)
7170
greentea_metrics_setup();
72-
#endif
7371
// Key-value protocol handshake function. Waits for {{__sync;...}} message
7472
// Sync preamble: "{{__sync;0dad4a9d-59a3-4aec-810d-d5fb09d852c1}}"
7573
// Example value of sync_uuid == "0dad4a9d-59a3-4aec-810d-d5fb09d852c1"
@@ -484,9 +482,7 @@ static void greentea_notify_completion(const int result) {
484482
__gcov_flush();
485483
coverage_report = false;
486484
#endif
487-
#if defined(MBED_CONF_RTOS_PRESENT)
488485
greentea_metrics_report();
489-
#endif
490486
greentea_send_kv(GREENTEA_TEST_ENV_END, val);
491487
greentea_send_kv(GREENTEA_TEST_ENV_EXIT, 0);
492488
}

0 commit comments

Comments
 (0)