diff --git a/tests/sys/snprintf/Makefile b/tests/sys/snprintf/Makefile index d5e587b491..db6f70cd75 100644 --- a/tests/sys/snprintf/Makefile +++ b/tests/sys/snprintf/Makefile @@ -4,4 +4,9 @@ include ../Makefile.sys_common # to compile due to PRI*64 macros not being defined FEATURES_BLACKLIST := arch_avr8 +# This enables support for printing 64 bit numbers. You can comment this out +# to shrink the test app. The test will skip the corresponding test +# automatically if printf_long_long is not used. +USEMODULE += printf_long_long + include $(RIOTBASE)/Makefile.include diff --git a/tests/sys/snprintf/main.c b/tests/sys/snprintf/main.c index bf9b338867..29a61f2586 100644 --- a/tests/sys/snprintf/main.c +++ b/tests/sys/snprintf/main.c @@ -27,6 +27,8 @@ #include #include +#include "modules.h" + static bool failed = false; static void check(const char *expected, const char *got, int retval) @@ -277,7 +279,12 @@ int main(void) test_int8(); test_int16(); test_int32(); - test_int64(); + if (IS_USED(MODULE_PRINTF_LONG_LONG)) { + test_int64(); + } + else { + puts("WARNING: Module printf_long_long not used, skipping test for 64 bit"); + } test_size(); test_flags_widths();