From 66b9e86eafc3709c491f96c917069db8b6a0c895 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 7 Jul 2006 15:33:31 +0200 Subject: Add support for checking test suite coverage using gcov. --- tests/Makefile | 9 +++++++-- tests/check_nick.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index ce8ed690..206331f4 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2,12 +2,17 @@ include ../Makefile.settings LFLAGS +=-lcheck -all: check +all: check ./check +clean: + rm -f check *.o + main_objs = account.o bitlbee.o conf.o crypting.o help.o ini.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_text.o url.o user.o util.o -check: check.o check_util.o check_nick.o $(addprefix ../, $(main_objs)) ../protocols/protocols.o +test_objs = check.o check_util.o check_nick.o + +check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o @echo '*' Linking $@ @$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS) diff --git a/tests/check_nick.c b/tests/check_nick.c index 5858e512..b235d260 100644 --- a/tests/check_nick.c +++ b/tests/check_nick.c @@ -22,7 +22,7 @@ START_TEST(test_nick_strip) NULL }; for (i = 0; get[i]; i++) { - char copy[30]; + char copy[60]; strcpy(copy, get[i]); nick_strip(copy); fail_unless (strcmp(copy, expected[i]) == 0, -- cgit v1.2.3