diff --git a/core/lib/init.c b/core/lib/init.c index b20252945d..cdf7358a4e 100644 --- a/core/lib/init.c +++ b/core/lib/init.c @@ -60,7 +60,12 @@ static void *main_trampoline(void *arg) LOG_INFO(CONFIG_BOOT_MSG_STRING "\n"); } - main(); + int res = main(); + + if (IS_USED(MODULE_TEST_UTILS_MAIN_EXIT_CB)) { + void test_utils_main_exit_cb(int res); + test_utils_main_exit_cb(res); + } #ifdef MODULE_TEST_UTILS_PRINT_STACK_USAGE void print_stack_usage_metric(const char *name, void *stack, unsigned max_size); diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk index 2516929079..17cb40b7de 100644 --- a/makefiles/pseudomodules.inc.mk +++ b/makefiles/pseudomodules.inc.mk @@ -581,6 +581,7 @@ PSEUDOMODULES += crypto_aes_unroll # declare shell version of test_utils_interactive_sync PSEUDOMODULES += test_utils_interactive_sync_shell +PSEUDOMODULES += test_utils_main_exit_cb # All auto_init modules are pseudomodules PSEUDOMODULES += auto_init_% diff --git a/pkg/libfixmath/Makefile b/pkg/libfixmath/Makefile index 821da687d1..bb7164d0fb 100644 --- a/pkg/libfixmath/Makefile +++ b/pkg/libfixmath/Makefile @@ -1,5 +1,5 @@ PKG_NAME := libfixmath -PKG_VERSION := 24488b16cc0359daada0682a9bd3a11a801d0a01 +PKG_VERSION := b987044c73dcaba496bb5bc86e69d134cd8790ec PKG_URL := https://github.com/PetteriAimonen/libfixmath PKG_LICENSE := MIT @@ -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/pkg/libfixmath/patches/0001-Fix-warnings.patch b/pkg/libfixmath/patches/0001-Fix-warnings.patch deleted file mode 100644 index f990c3d854..0000000000 Binary files a/pkg/libfixmath/patches/0001-Fix-warnings.patch and /dev/null differ diff --git a/pkg/libfixmath/patches/0002-Adapt-unittests-for-RIOT.patch b/pkg/libfixmath/patches/0002-Adapt-unittests-for-RIOT.patch deleted file mode 100644 index d85a42c465..0000000000 Binary files a/pkg/libfixmath/patches/0002-Adapt-unittests-for-RIOT.patch and /dev/null differ diff --git a/pkg/tinydtls/Makefile b/pkg/tinydtls/Makefile index 621dbf9615..973f44dbc1 100644 --- a/pkg/tinydtls/Makefile +++ b/pkg/tinydtls/Makefile @@ -1,6 +1,6 @@ PKG_NAME=tinydtls PKG_URL=https://github.com/eclipse/tinydtls.git -PKG_VERSION=297fced854b652591b78113f0ba8d57ad9f934d9 +PKG_VERSION=c58f484ac417afe036273d65506b63a0902c740c PKG_LICENSE=EPL-1.0,EDL-1.0 include $(RIOTBASE)/pkg/pkg.mk diff --git a/pkg/tinydtls/Makefile.include b/pkg/tinydtls/Makefile.include index aebc670325..fda2825bd6 100644 --- a/pkg/tinydtls/Makefile.include +++ b/pkg/tinydtls/Makefile.include @@ -39,12 +39,6 @@ ifeq (,$(CONFIG_KCONFIG_USEPKG_TINYDTLS)) endif endif -ifneq (,$(or $(CONFIG_DTLS_DEBUG),$(filter -DCONFIG_DTLS_DEBUG,$(CFLAGS)))) - CFLAGS += -DTINYDTLS_LOG_LVL=6 -else - CFLAGS += -DTINYDTLS_LOG_LVL=0 -endif - # For now contrib only contains sock_dtls adaption ifneq (,$(filter tinydtls_sock_dtls,$(USEMODULE))) DIRS += $(RIOTBASE)/pkg/tinydtls/contrib diff --git a/pkg/tinydtls/contrib/sock_dtls.c b/pkg/tinydtls/contrib/sock_dtls.c index 124a0a07bd..cab2941557 100644 --- a/pkg/tinydtls/contrib/sock_dtls.c +++ b/pkg/tinydtls/contrib/sock_dtls.c @@ -887,7 +887,6 @@ void sock_dtls_close(sock_dtls_t *sock) void sock_dtls_init(void) { dtls_init(); - dtls_set_log_level(TINYDTLS_LOG_LVL); } static void _ep_to_session(const sock_udp_ep_t *ep, session_t *session) 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"); + } }