mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 18:19:52 -05:00
Setup for gcov/coverage testing
This commit is contained in:
parent
a3e5539505
commit
277526d0f0
2 changed files with 18 additions and 0 deletions
3
libraries/liblmdb/.gitignore
vendored
3
libraries/liblmdb/.gitignore
vendored
|
|
@ -10,6 +10,9 @@ mdb_stat
|
|||
*.bak
|
||||
*.orig
|
||||
*.rej
|
||||
*.gcov
|
||||
*.gcda
|
||||
*.gcno
|
||||
core
|
||||
core.*
|
||||
valgrind.*
|
||||
|
|
|
|||
|
|
@ -76,3 +76,18 @@ midl.o: midl.c midl.h
|
|||
|
||||
%.o: %.c lmdb.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
coverage: xmtest
|
||||
-rm -rf testdb; mkdir testdb
|
||||
./xmtest
|
||||
gcov xmdb.c
|
||||
gcov xmidl.c
|
||||
|
||||
xmtest: mtest.o xmdb.o xmidl.o
|
||||
gcc -o xmtest mtest.o xmdb.o xmidl.o -pthread -fprofile-arcs -ftest-coverage
|
||||
|
||||
xmdb.o: mdb.c lmdb.h midl.h
|
||||
$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -O0 -fprofile-arcs -ftest-coverage -c mdb.c -o $@
|
||||
|
||||
xmidl.o: midl.c midl.h
|
||||
$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -O0 -fprofile-arcs -ftest-coverage -c midl.c -o $@
|
||||
|
|
|
|||
Loading…
Reference in a new issue