1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 00:09:46 +01:00

tests/pkg_libfixmath_unittests: adapt test to upstream changes

Let's no longer patch the upstream test but use it directly
This commit is contained in:
Benjamin Valentin 2023-01-20 17:42:54 +01:00
parent ea799e738d
commit d102723bc9
4 changed files with 14 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -29,17 +29,12 @@
*/
#include <stdio.h>
#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");
}
}