aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/ch_test.c17
-rw-r--r--test/lib/ch_test.h7
2 files changed, 24 insertions, 0 deletions
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
@@ -105,6 +105,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.
*