From 8d0c7b1faeed1e3df6e6f90658559f373bbf63fb Mon Sep 17 00:00:00 2001 From: Toni Date: Wed, 18 Aug 2021 12:34:16 +0300 Subject: Fixed Mingw64 build, SonerCloud-CI and more. (#1273) * Added ARM build and unit test run for SonarCloud-CI. Signed-off-by: Toni Uhlig * Fixed Mingw64 build. * adapted to SonarCloud-CI workflow * removed broken and incomplete Windows example (tested on VS2017/VS2019) * removed unnecessary include (e.g. pthread.h for the library which does not make use of it) Signed-off-by: Toni Uhlig --- tests/dga/Makefile.in | 9 +++++++++ tests/unit/Makefile.in | 9 +++++++++ tests/unit/unit.c | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/dga/Makefile.in b/tests/dga/Makefile.in index fc94ed7e7..2376abbbe 100644 --- a/tests/dga/Makefile.in +++ b/tests/dga/Makefile.in @@ -1,5 +1,6 @@ CC=@CC@ CXX=@CXX@ +BUILD_MINGW=@BUILD_MINGW@ SRCHOME=../../src @@ -10,6 +11,12 @@ HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/include/ndpi_typedefs.h $(SRCHO OBJS=dga_evaluate PREFIX?=@prefix@ +ifneq ($(BUILD_MINGW),) +all: + @echo 'DGA test disabled due to mingw build.' + +else + all: dga_evaluate EXECUTABLE_SOURCES := dga_evaluate.c @@ -34,3 +41,5 @@ distdir: distclean: clean /bin/rm -f Makefile + +endif diff --git a/tests/unit/Makefile.in b/tests/unit/Makefile.in index efbd387c8..98a3d67f4 100644 --- a/tests/unit/Makefile.in +++ b/tests/unit/Makefile.in @@ -1,5 +1,6 @@ CC=@CC@ CXX=@CXX@ +BUILD_MINGW=@BUILD_MINGW@ SRCHOME=../../src @@ -10,6 +11,12 @@ HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/include/ndpi_typedefs.h $(SRCHO OBJS=unit PREFIX?=@prefix@ +ifneq ($(BUILD_MINGW),) +all: + @echo 'Unit tests disabled due to mingw build.' + +else + all: unit EXECUTABLE_SOURCES := unit.c @@ -34,3 +41,5 @@ distdir: distclean: clean /bin/rm -f Makefile + +endif diff --git a/tests/unit/unit.c b/tests/unit/unit.c index 2842638c2..d17ab3e89 100644 --- a/tests/unit/unit.c +++ b/tests/unit/unit.c @@ -33,6 +33,8 @@ #else #include #include +#include +#include #endif #include @@ -44,12 +46,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include "ndpi_config.h" -- cgit v1.2.3