summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-08-25 09:32:48 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-08-25 09:57:21 -0700
commitc7acc6d1f46be6a53dd999e570fe46bc6ce0d686 (patch)
tree5e802ab47c21b325cdc460bc7f66467e36f37071 /Makefile
parent9865f042ede0186f932e611e50e2ec3b789ee986 (diff)
build: Rework config=coverage to be more robust
Use find -exec instead of xargs to work around differences between xargs on OSX and Linux. Use -b option of gcov - for some reason gcov on Travis can't find .gcno files otherwise (old version?). And finally enable config=coverage again.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ad0dc1e..6831882 100644
--- a/Makefile
+++ b/Makefile
@@ -54,10 +54,10 @@ all: $(EXECUTABLE)
ifeq ($(config),coverage)
test: $(EXECUTABLE)
- -@find $(BUILD) -name '*.gcda' | xargs rm
+ -@find $(BUILD) -name '*.gcda' -exec rm {} +
./$(EXECUTABLE)
- @gcov -b -c $(BUILD)/src/pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;'
- @ls *.gcov | grep -v pugixml.cpp.gcov | xargs rm
+ @gcov -b -o=$(BUILD)/src pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;'
+ @find . -name '*.gcov' -and -not -name 'pugixml.cpp.gcov' -exec rm {} +
else
test: $(EXECUTABLE)
./$(EXECUTABLE)