From e5049e103d5cf64ca047cb33f5ff3a9f16139dec Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 31 Mar 2019 14:30:25 +0000 Subject: Updates from trunk. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12719 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- test/lib/ch_test.c | 17 +++++++++++++++++ test/lib/ch_test.h | 7 +++++++ 2 files changed, 24 insertions(+) (limited to 'test/lib') diff --git a/test/lib/ch_test.c b/test/lib/ch_test.c index 859ecdf9f..7c6253674 100644 --- a/test/lib/ch_test.c +++ b/test/lib/ch_test.c @@ -255,6 +255,23 @@ msg_t test_execute(BaseSequentialStream *stream, const testsuite_t *tsp) { test_print("*** Test Board: "); test_println(BOARD_NAME); #endif +#if defined(TEST_SIZE_REPORT) + { + extern uint8_t __text_base, __text_end, + _data_start, _data_end, + _bss_start, _bss_end; + test_println("***"); + test_print("*** Text size: "); + test_printn((uint32_t)(&__text_end - &__text_base)); + test_println(" bytes"); + test_print("*** Data size: "); + test_printn((uint32_t)(&_data_end - &_data_start)); + test_println(" bytes"); + test_print("*** BSS size: "); + test_printn((uint32_t)(&_bss_end - &_bss_start)); + test_println(" bytes"); + } +#endif #if defined(TEST_REPORT_HOOK_HEADER) TEST_REPORT_HOOK_HEADER #endif diff --git a/test/lib/ch_test.h b/test/lib/ch_test.h index b78591689..3b51085cb 100644 --- a/test/lib/ch_test.h +++ b/test/lib/ch_test.h @@ -104,6 +104,13 @@ typedef struct { */ #define test_set_step(step) test_step = (step) +/** + * @brief End step marker. + * + * @param[in] step the step number + */ +#define test_end_step(step) (void)(step); + /** * @brief Test failure enforcement. * @note This function can only be called from test_case execute context. -- cgit v1.2.3