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 error
pull/8030/head
ccli8 2018-08-14 18:40:19 +08:00
parent ab7b93ca58
commit 4888ff2b11
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}