Tests: Watchdog: Decrease default timeout to 100 ms

pull/10777/head
Filip Jagodzinski 2018-05-15 15:11:48 +02:00 committed by Filip Jagodzinski
parent c29cdab079
commit d634862a09
2 changed files with 6 additions and 5 deletions

View File

@ -40,7 +40,7 @@
// Do not set watchdog timeout shorter than 50 ms as it may cause the
// host-test-runner return 'TIMEOUT' instead of 'FAIL' / 'PASS' if watchdog
// performs reset during test suite teardown.
#define WDG_TIMEOUT_MS 500UL
#define WDG_TIMEOUT_MS 100UL
#define MSG_VALUE_DUMMY "0"
#define MSG_VALUE_LEN 24
@ -243,8 +243,8 @@ Case cases[] = {
test_update_config,
(utest::v1::case_teardown_handler_t) case_teardown_wdg_stop_or_reset),
Case("Init, 500 ms", (utest::v1::case_setup_handler_t) case_setup_sync_on_reset,
test_init<500UL>, (utest::v1::case_teardown_handler_t) case_teardown_sync_on_reset),
Case("Init, 100 ms", (utest::v1::case_setup_handler_t) case_setup_sync_on_reset,
test_init<100UL>, (utest::v1::case_teardown_handler_t) case_teardown_sync_on_reset),
Case("Init, max_timeout", (utest::v1::case_setup_handler_t) case_setup_sync_on_reset,
test_init_max_timeout, (utest::v1::case_teardown_handler_t) case_teardown_sync_on_reset),
};

View File

@ -25,13 +25,14 @@
#include "watchdog_reset_tests.h"
#include "mbed.h"
#define TIMEOUT_MS 500UL
#if TARGET_NUMAKER_PFM_NANO130
/* On NUMAKER_PFM_NANO130 target, WDT's clock source is fixed to LIRC, which is more
* inaccurate than other targets. Enlarge this delta define to pass this test. */
#define TIMEOUT_MS 500UL
#define TIMEOUT_DELTA_MS 100UL
#else
#define TIMEOUT_DELTA_MS 50UL
#define TIMEOUT_MS 100UL
#define TIMEOUT_DELTA_MS 10UL
#endif
#define MSG_VALUE_DUMMY "0"