Changeset 66b9e86e


Ignore:
Timestamp:
2006-07-07T13:33:31Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
f4aa393
Parents:
bf25fa3
Message:

Add support for checking test suite coverage using gcov.

Files:
10 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    rbf25fa3 r66b9e86e  
    1313.gdb_history
    1414tests/check
     15*.gcda
     16*.gcov
     17*.gcno
  • Makefile

    rbf25fa3 r66b9e86e  
    1212objects = 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 unix.o url.o user.o util.o
    1313headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ini.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h url.h user.h protocols/http_client.h protocols/md5.h protocols/nogaim.h protocols/proxy.h protocols/sha.h protocols/ssl_client.h
    14 subdirs = protocols
     14subdirs = protocols 
    1515
    1616# Expansion of variables
     
    4040clean: $(subdirs)
    4141        rm -f *.o $(OUTFILE) core utils/bitlbeed encode decode
     42        $(MAKE) -C tests clean
    4243
    4344distclean: clean $(subdirs)
    4445        rm -f Makefile.settings config.h
    4546        find . -name 'DEADJOE' -o -name '*.orig' -o -name '*.rej' -o -name '*~' -exec rm -f {} \;
     47        $(MAKE) -C test distclean
    4648
    47 check:
     49check: all
    4850        $(MAKE) -C tests
     51
     52gcov: check
     53        gcov *.c
    4954
    5055install-doc:
  • configure

    rbf25fa3 r66b9e86e  
    2828debug=0
    2929strip=1
     30gcov=0
    3031ipv6=1
    3132
     
    6465--debug=0/1     Disable/enable debugging                $debug
    6566--strip=0/1     Disable/enable binary stripping         $strip
     67--gcov=0/1      Disable/enable test coverage reporting  $gcov
    6668
    6769--ipv6=0/1      IPv6 socket support                     $ipv6
     
    314316fi
    315317
     318if [ "$gcov" = "1" ]; then
     319        echo "CFLAGS+=-ftest-coverage -fprofile-arcs" >> Makefile.settings
     320        echo "EFLAGS+=-lgcov" >> Makefile.settings
     321fi
     322
    316323echo
    317324if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then
  • protocols/Makefile

    rbf25fa3 r66b9e86e  
    2626# [SH] Phony targets
    2727all: protocols.o
     28check: all
     29gcov:
     30        gcov *.c
    2831
    2932.PHONY: all clean distclean $(subdirs)
  • protocols/jabber/Makefile

    rbf25fa3 r66b9e86e  
    1717# [SH] Phony targets
    1818all: jabber_mod.o
     19check: all
    1920
    2021.PHONY: all clean distclean
  • protocols/msn/Makefile

    rbf25fa3 r66b9e86e  
    1717# [SH] Phony targets
    1818all: msn_mod.o
     19check: all
     20gcov:
     21        gcov *.c
    1922       
    2023.PHONY: all clean distclean
  • protocols/oscar/Makefile

    rbf25fa3 r66b9e86e  
    1717# [SH] Phony targets
    1818all: oscar_mod.o
     19check: all
     20gcov:
     21        gcov *.c
    1922
    2023.PHONY: all clean distclean
  • protocols/yahoo/Makefile

    rbf25fa3 r66b9e86e  
    1717# [SH] Phony targets
    1818all: yahoo_mod.o
     19check: all
     20gcov:
     21        gcov *.c
    1922
    2023.PHONY: all clean distclean
  • tests/Makefile

    rbf25fa3 r66b9e86e  
    33LFLAGS +=-lcheck
    44
    5 all: check
     5all: check 
    66        ./check
     7
     8clean:
     9        rm -f check *.o
    710
    811main_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
    912
    10 check: check.o check_util.o check_nick.o $(addprefix ../, $(main_objs)) ../protocols/protocols.o
     13test_objs = check.o check_util.o check_nick.o
     14
     15check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o
    1116        @echo '*' Linking $@
    1217        @$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS)
  • tests/check_nick.c

    rbf25fa3 r66b9e86e  
    2323
    2424        for (i = 0; get[i]; i++) {
    25                 char copy[30];
     25                char copy[60];
    2626                strcpy(copy, get[i]);
    2727                nick_strip(copy);
Note: See TracChangeset for help on using the changeset viewer.