From 60c922df1a8d2e5db077545f2e9e8e46e40eff20 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 2 Nov 2019 14:27:27 +0100 Subject: [PATCH] tests/memarray: allow overridable macros and print them MAX_NUMBER_BLOCKS and NUMBER_OF_TESTS can be overriden via CFLAGS --- tests/memarray/main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/memarray/main.c b/tests/memarray/main.c index 9b68d44af4..394a76b372 100644 --- a/tests/memarray/main.c +++ b/tests/memarray/main.c @@ -25,9 +25,15 @@ #include "memarray.h" -#define MAX_NUMBER_BLOCKS (10) #define MESSAGE_SIZE (8U) + +#ifndef MAX_NUMBER_BLOCKS +#define MAX_NUMBER_BLOCKS (10) +#endif + +#ifndef NUMBER_OF_TESTS #define NUMBER_OF_TESTS (12) +#endif extern int _ps_handler(int argc, char **argv); @@ -94,6 +100,9 @@ void free_memory(struct block_t *head) int main(void) { + printf("MAX_NUMBER_BLOCKS: %d\n", MAX_NUMBER_BLOCKS); + printf("NUMBER_OF_TESTS: %d\n", NUMBER_OF_TESTS); + memory_block_init(); int count = 0;