diff --git a/pkg/libfixmath/Makefile b/pkg/libfixmath/Makefile index 3883ad93f8..bb7164d0fb 100644 --- a/pkg/libfixmath/Makefile +++ b/pkg/libfixmath/Makefile @@ -9,4 +9,4 @@ all: $(filter libfixmath-unittests,$(USEMODULE)) $(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/$(PKG_NAME) -f $(CURDIR)/Makefile.$(PKG_NAME) libfixmath-unittests: - $(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/unittests -f $(CURDIR)/Makefile.$(PKG_NAME)-unittests + $(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/tests -f $(CURDIR)/Makefile.$(PKG_NAME)-unittests diff --git a/pkg/libfixmath/Makefile.include b/pkg/libfixmath/Makefile.include index c85b62aef4..c178d16777 100644 --- a/pkg/libfixmath/Makefile.include +++ b/pkg/libfixmath/Makefile.include @@ -14,5 +14,6 @@ CFLAGS += $(libfixmath_options:CONFIG_FIXMATH_%=-DFIXMATH_%) INCLUDES += -I$(PKG_SOURCE_DIR)/libfixmath ifneq (,$(filter libfixmath-unittests,$(USEMODULE))) - INCLUDES += -I$(PKG_SOURCE_DIR)/unittests + INCLUDES += -I$(PKG_SOURCE_DIR) + INCLUDES += -I$(PKG_SOURCE_DIR)/tests endif diff --git a/tests/pkg_libfixmath_unittests/Makefile b/tests/pkg_libfixmath_unittests/Makefile index 0472e5e238..dfbe881e7a 100644 --- a/tests/pkg_libfixmath_unittests/Makefile +++ b/tests/pkg_libfixmath_unittests/Makefile @@ -7,6 +7,11 @@ ifneq (,$(filter native,$(BOARD))) endif USEMODULE += printf_float +USEMODULE += test_utils_main_exit_cb + +CFLAGS += -Wno-error=strict-prototypes +CFLAGS += -Wno-error=old-style-definition +CFLAGS += -Wno-error=format TEST_ON_CI_WHITELIST += native diff --git a/tests/pkg_libfixmath_unittests/main.c b/tests/pkg_libfixmath_unittests/main.c index d401275d7f..032e70d132 100644 --- a/tests/pkg_libfixmath_unittests/main.c +++ b/tests/pkg_libfixmath_unittests/main.c @@ -29,17 +29,12 @@ */ #include -#include "libfixmath-unittests.h" -#define RUN(x) if (x() != 0) { return 1; } - -int main(void) +void test_utils_main_exit_cb(int res) { - RUN(fix16_exp_unittests); - RUN(fix16_macros_unittests); - RUN(fix16_str_unittests); - RUN(fix16_unittests); - - puts("SUCCESS"); - return 0; + if (res) { + puts("FAILED"); + } else { + puts("SUCCESS"); + } }