Skip to content
Snippets Groups Projects
Commit 277526d0 authored by Howard Chu's avatar Howard Chu
Browse files

Setup for gcov/coverage testing

parent a3e55395
No related branches found
No related tags found
No related merge requests found
......@@ -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 $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment