Ignore LWIP_PLATFORM_ASSERT when running tests

This commit is contained in:
Erik Ekman 2012-11-04 12:07:23 +01:00 committed by Simon Goldschmidt
parent c9a6db0ff3
commit a37d623975
2 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,7 @@ CODEDIR=../../../../lwip
LWIPDIR=$(CODEDIR)/src
LDFLAGS:=$(LDFLAGS) -lcheck
CFLAGS:=$(CFLAGS) -I/usr/include/check -I$(LWIPDIR)/../test/unit \
CFLAGS:=$(CFLAGS) -DLWIP_UNIX_EMPTY_ASSERT -I/usr/include/check -I$(LWIPDIR)/../test/unit \
-I$(LWIPDIR)/include -I$(LWIPDIR)/include/ipv4 \
-I$(LWIPDIR)/include/ipv6 -Iunix/include -I. -I../include

View File

@ -82,8 +82,12 @@ typedef unsigned long mem_ptr_t;
/* Plaform specific diagnostic output */
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
#ifdef LWIP_UNIX_EMPTY_ASSERT
#define LWIP_PLATFORM_ASSERT(x)
#else
#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \
x, __LINE__, __FILE__); fflush(NULL); abort();} while(0)
#endif
#define LWIP_RAND() ((u32_t)rand())