Skip to content

Commit

Permalink
[libnozzle] prepare Makefile.am to explode with API tests
Browse files Browse the repository at this point in the history
also fix nozzle_test for using global compiler flags

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Dec 15, 2018
1 parent 7f2a616 commit 7aad628
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions libnozzle/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ MAINTAINERCLEANFILES = Makefile.in

include $(top_srcdir)/build-aux/check.mk

EXTRA_DIST = tap_updown_bad tap_updown_good api-test-coverage
EXTRA_DIST = \
tap_updown_bad \
tap_updown_good \
api-test-coverage

if BUILD_LIBNOZZLE

check_PROGRAMS = nozzle_test
check_PROGRAMS = \
nozzle_test

TESTS = $(check_PROGRAMS)

Expand All @@ -26,15 +30,11 @@ check-api-test-coverage:
chmod u+x $(top_srcdir)/libnozzle/tests/api-test-coverage
$(top_srcdir)/libnozzle/tests/api-test-coverage $(top_srcdir) $(top_builddir)

AM_CPPFLAGS = -I$(top_srcdir)/libnozzle -DABSBUILDDIR=\"$(abs_builddir)\"
AM_CFLAGS += $(PTHREAD_CFLAGS) $(libnl_CFLAGS)
LIBS += $(top_builddir)/libnozzle/libnozzle.la $(PTHREAD_LIBS) $(libnl_LIBS)

nozzle_test_SOURCES = nozzle_test.c \
../internals.c

nozzle_test_CPPFLAGS = -I$(top_srcdir)/libnozzle \
-DABSBUILDDIR=\"$(abs_builddir)\"

nozzle_test_CFLAGS = $(PTHREAD_CFLAGS) $(libnl_CFLAGS)

nozzle_test_LDFLAGS = $(top_builddir)/libnozzle/libnozzle.la \
$(PTHREAD_LIBS) $(libnl_LIBS)

endif
6 changes: 3 additions & 3 deletions libnozzle/tests/nozzle_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static int check_knet_mtu_ipv6(void)
{
char device_name[IFNAMSIZ];
size_t size = IFNAMSIZ;
char verifycmd[1024];
char verifycmd[2048];
int err=0;
nozzle_t nozzle;
char *error_string = NULL;
Expand Down Expand Up @@ -980,11 +980,11 @@ static int check_knet_set_del_ip(void)
{
char device_name[IFNAMSIZ];
size_t size = IFNAMSIZ;
char verifycmd[1024];
char verifycmd[2048];
int err = 0;
nozzle_t nozzle;
struct nozzle_ip *ip_list = NULL, *ip_list_tmp = NULL;
int ip_list_entries = 0, i;
int ip_list_entries = 0;
char *error_string = NULL;

printf("Testing interface add/remove ip\n");
Expand Down

0 comments on commit 7aad628

Please sign in to comment.