Tests: RTOS: RtosTimer: Fix tests on debug profile

Redefine error() as noop to fix tests being aborted when compiled
with -DMBED_TRAP_ERRORS_ENABLED=1.
pull/4947/head
Filip Jagodzinski 2017-09-26 13:32:32 +02:00
parent 33e38cc0d2
commit 311d38b925
1 changed files with 13 additions and 0 deletions

View File

@ -36,6 +36,19 @@ void timer_callback(void const *arg)
sem->release();
}
/* In order to successfully run this test suite when compiled with --profile=debug
* error() has to be redefined as noop.
*
* RtosTimer calls RTX API which uses Event Recorder functionality. When compiled
* with MBED_TRAP_ERRORS_ENABLED=1 (set in debug profile) EvrRtxTimerError() calls error()
* which aborts test program.
*/
#if defined(MBED_TRAP_ERRORS_ENABLED) && MBED_TRAP_ERRORS_ENABLED
void error(const char* format, ...) {
(void) format;
}
#endif
/** Test one-shot not restarted when elapsed
*
* Given a one-shot timer