Skip to content
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

Skip Greentea tests for Mbed OS code coverage on Fast Models #7805

Merged
merged 6 commits into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 8 additions & 0 deletions TESTS/mbed_drivers/ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ void increment_multi_counter(void)
*/
void test_case_1x_ticker()
{
#if defined(__ARM_FM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's required to skip tests, the pattern that we use is to add the #if def in the Cases cases[] array.
This makes determining if tests are being skipped much easier to follow.

Please make this change to this and the other tests.

Copy link
Contributor Author

@jamesbeyond jamesbeyond Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, that was my first attempt. with more then one case it just fine.
However, some of the tests only have one test case, e.g. here
I can't skip the only test case in the Case case[ ] . any suggestions on this case ? should I block the whole test file as NOT_SUPPORTTED

I took the currently method purely becasue it give a message while skipping the tests. I admit it not as easy as the other on to follow in the code level.
@cmonr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's a good point.

As an example for how things are done right now (doesn't mean that they should be like this, just means that this is how we do it right now), take a look at this test: https://github.com/ARMmbed/mbed-os/blob/master/TESTS/mbed_hal/common_tickers/main.cpp

There's an ifdef on the top of the file for targets that don't have the supported feature, and another ifdef for if a different feature is available. Please follow this pattern for this PR, and I would appreciate an issue being opened for this alternate method.

TEST_SKIP_MESSAGE("FastModels not support time drifting test")
#endif

char _key[11] = { };
char _value[128] = { };
int expected_key = 1;
Expand Down Expand Up @@ -145,6 +149,10 @@ void test_case_1x_ticker()
*/
void test_case_2x_ticker()
{
#if defined(__ARM_FM)
TEST_SKIP_MESSAGE("FastModels not support time drifting test")
#endif

char _key[11] = { };
char _value[128] = { };
int expected_key = 1;
Expand Down
4 changes: 4 additions & 0 deletions TESTS/mbed_drivers/timeout/timeout_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ class TimeoutDriftTester {
template<typename T>
void test_drift(void)
{
#if defined(__ARM_FM)
TEST_SKIP_MESSAGE("FastModels not support time drifting test")
#endif

char _key[11] = { };
char _value[128] = { };
int expected_key = 1;
Expand Down
4 changes: 4 additions & 0 deletions TESTS/mbed_hal/common_tickers_freq/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ void ticker_event_handler_stub(const ticker_data_t *const ticker)
/* Test that the ticker is operating at the frequency it specifies. */
void ticker_frequency_test()
{
#if defined(__ARM_FM)
TEST_SKIP_MESSAGE("FastModels not support time drifting test")
#endif

char _key[11] = { };
char _value[128] = { };
int expected_key = 1;
Expand Down
6 changes: 6 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/basic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ using utest::v1::Case;

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define TEST_STACK_SIZE 512
#elif defined(__ARM_FM)
#define TEST_STACK_SIZE 512
#else
#define TEST_STACK_SIZE 256
#endif
Expand Down Expand Up @@ -65,6 +67,10 @@ void update_tick_thread(Mutex *mutex)
*/
void test(void)
{
#if defined(__ARM_FM)
TEST_SKIP_MESSAGE("FastModels not support time drifting test")
#endif

char _key[11] = { };
char _value[128] = { };
int expected_key = 1;
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/mail/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ using namespace utest::v1;

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 320 /* larger stack cause out of heap memory on some 16kB RAM boards in multi thread test*/
#endif
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/malloc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ volatile bool thread_should_continue = true;
#define THREAD_STACK_SIZE 512
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 256
#endif
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/threads/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define PARALLEL_THREAD_STACK_SIZE 512
#else
#define PARALLEL_THREAD_STACK_SIZE 384
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ENTRY(Reset_Handler)
STACK_SIZE = 0x400;

/* Size of the vector table in SRAM */
M_VECTOR_RAM_SIZE = 0x100;
M_VECTOR_RAM_SIZE = NVIC_VECTORS_SIZE;

SECTIONS
{
Expand Down
11 changes: 6 additions & 5 deletions targets/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -4259,6 +4259,7 @@
"ARM_FM": {
"inherits": ["Target"],
"public": false,
"macros": ["__ARM_FM"],
"extra_labels": ["ARM_FM"]
},
"FVP_MPS2": {
Expand All @@ -4272,27 +4273,27 @@
"FVP_MPS2_M0": {
"inherits": ["FVP_MPS2"],
"core": "Cortex-M0",
"macros": ["CMSDK_CM0"]
"macros_add": ["CMSDK_CM0"]
},
"FVP_MPS2_M0P": {
"inherits": ["FVP_MPS2"],
"core": "Cortex-M0+",
"macros": ["CMSDK_CM0plus"]
"macros_add": ["CMSDK_CM0plus"]
},
"FVP_MPS2_M3": {
"inherits": ["FVP_MPS2"],
"core": "Cortex-M3",
"macros": ["CMSDK_CM3"]
"macros_add": ["CMSDK_CM3"]
},
"FVP_MPS2_M4": {
"inherits": ["FVP_MPS2"],
"core": "Cortex-M4",
"macros": ["CMSDK_CM4"]
"macros_add": ["CMSDK_CM4"]
},
"FVP_MPS2_M7": {
"inherits": ["FVP_MPS2"],
"core": "Cortex-M7",
"macros": ["CMSDK_CM7"]
"macros_add": ["CMSDK_CM7"]
},
"NUMAKER_PFM_M2351": {
"core": "Cortex-M23-NS",
Expand Down