mirror of https://github.com/ARMmbed/mbed-os.git
Fix Greentea test common_tickers failed
1. Disable ticker interrupt which would interfere with fire_interrupt speed test 2. Enlarge test period to avoid timeout errorpull/8030/head
parent
ab7b93ca58
commit
4888ff2b11
|
@ -473,11 +473,14 @@ void ticker_speed_test(void)
|
|||
|
||||
/* ---- Test fire_interrupt function. ---- */
|
||||
counter = NUM_OF_CALLS;
|
||||
/* Disable ticker interrupt which would interfere with speed test */
|
||||
core_util_critical_section_enter();
|
||||
start = us_ticker_read();
|
||||
while (counter--) {
|
||||
intf->fire_interrupt();
|
||||
}
|
||||
stop = us_ticker_read();
|
||||
core_util_critical_section_exit();
|
||||
|
||||
TEST_ASSERT(diff_us(start, stop, us_ticker_info) < (NUM_OF_CALLS * (MAX_FUNC_EXEC_TIME_US + DELTA_FUNC_EXEC_TIME_US)));
|
||||
|
||||
|
@ -569,7 +572,7 @@ utest::v1::status_t lp_ticker_teardown(const Case *const source, const size_t pa
|
|||
|
||||
utest::v1::status_t test_setup(const size_t number_of_cases)
|
||||
{
|
||||
GREENTEA_SETUP(30, "default_auto");
|
||||
GREENTEA_SETUP(80, "default_auto");
|
||||
return verbose_test_setup_handler(number_of_cases);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue