Skip to content

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

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 6 commits into from
Aug 27, 2018
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
2 changes: 2 additions & 0 deletions TESTS/mbed_drivers/ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,10 @@ Case cases[] = {
Case("Test detach", test_detach),
Case("Test multi call and time measure", test_multi_call_time),
Case("Test multi ticker", test_multi_ticker),
#if !defined(__ARM_FM) //FastModels not support time drifting test
Case("Test timers: 1x ticker", test_case_1x_ticker),
Case("Test timers: 2x ticker", test_case_2x_ticker)
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

if test_case_2x_ticker is skipped from compiled time do we need runtime check on line 149 ?

What limitations are there for ARM_FM for this 2 test cases ? I would like to avoid having this ifdef there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. my bad forgot to remove line 149, which suggested by @cmonr.

The reason was stated in the PR description:

FastModels targets are simulator running on the x86 hosts.
As the nature of non-RealTime x86 OS and FastModels, timing accuracy is not guaranteed
mbed time-drifting-tests will failing all the time on FastModel targets

my first version to skip the test was in line 149, now it been changed to like line 338

};

utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
Expand Down
3 changes: 2 additions & 1 deletion TESTS/mbed_drivers/timeout/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ Case cases[] = {
Case("1 s delay during sleep (attach_us)", test_sleep<AttachUSTester<Timeout>, 1000000, LONG_DELTA_US>,
greentea_failure_handler),
#endif

#if !defined(__ARM_FM) //FastModels not support time drifting test
Case("Timing drift (attach)", test_drift<AttachTester<Timeout> >),
Case("Timing drift (attach_us)", test_drift<AttachUSTester<Timeout> >),
#endif
};

utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
Expand Down
5 changes: 5 additions & 0 deletions TESTS/mbed_hal/common_tickers_freq/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
#error [NOT_SUPPORTED] test not supported
#endif

//FastModels not support time drifting test
#if defined(__ARM_FM)
#error [NOT_SUPPORTED] test not supported
#endif

#define US_PER_S 1000000

using namespace utest::v1;
Expand Down
5 changes: 5 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/basic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#error [NOT_SUPPORTED] test not supported
#endif

//FastModels not support time drifting test
#if defined(__ARM_FM)
#error [NOT_SUPPORTED] test not supported
#endif

using utest::v1::Case;

#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
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