From: Sebastian B. <sb...@us...> - 2013-12-24 09:11:44
|
Update of /cvsroot/simplemail/simplemail/tests In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30719/tests Modified Files: makefile Log Message: Moved the various test targets at the bottom of the file. Index: makefile =================================================================== RCS file: /cvsroot/simplemail/simplemail/tests/makefile,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- makefile 24 Dec 2013 09:11:09 -0000 1.35 +++ makefile 24 Dec 2013 09:11:41 -0000 1.36 @@ -55,55 +55,6 @@ lib$(SIMPLEMAIL_LIB).a: $(OBJS) ar rcs $@ $(OBJS) -# Define memleak targets -MEMLEAKS_TARGETS = $(foreach testexe,$(TESTEXES),memleaks-$(testexe)) - -# run template -define run.tmpl -run-$(1): $(1) - ./$$< -endef - -# "instanciate" run targets -$(foreach testexe,$(TESTEXES), \ - $(eval $(call run.tmpl,$(testexe))) \ -) - -# memleaks template -define memleak.tmpl -memleaks-$(1): $(1) -ifdef USE_VALGRIND_XML - valgrind $(VALGRIND_OPTS) --xml=yes --xml-file=$$@.xml ./$$< -else - valgrind $(VALGRIND_OPTS) ./$$< -endif -endef - -# "instanciate" memleak targets -$(foreach testexe,$(TESTEXES), \ - $(eval $(call memleak.tmpl,$(testexe))) \ -) - -.PHONY: memleaks -memleaks: $(MEMLEAKS_TARGETS) - - -# helgrind template -define helgrind.tmpl -helgrind-$(1): $(1) -ifdef USE_VALGRIND_XML - valgrind --tool=helgrind --xml=yes --xml-file=$$@.xml ./$$< -else - valgrind --tool=helgrind ./$$< -endif -endef - -# "instanciate" memleak targets -$(foreach testexe,$(TESTEXES), \ - $(eval $(call helgrind.tmpl,$(testexe))) \ -) - - .PHONY: clean clean: -rm -Rf test-objs $(TESTEXES) $(addsuffix .o,$(TESTEXES)) @@ -154,3 +105,51 @@ sleep 2 ./imap2_unittest $(DOVECOT) stop + +# Define memleak targets +MEMLEAKS_TARGETS = $(foreach testexe,$(TESTEXES),memleaks-$(testexe)) + +# run template +define run.tmpl +run-$(1): $(1) + ./$$< +endef + +# "instanciate" run targets +$(foreach testexe,$(TESTEXES), \ + $(eval $(call run.tmpl,$(testexe))) \ +) + +# memleaks template +define memleak.tmpl +memleaks-$(1): $(1) +ifdef USE_VALGRIND_XML + valgrind $(VALGRIND_OPTS) --xml=yes --xml-file=$$@.xml ./$$< +else + valgrind $(VALGRIND_OPTS) ./$$< +endif +endef + +# "instanciate" memleak targets +$(foreach testexe,$(TESTEXES), \ + $(eval $(call memleak.tmpl,$(testexe))) \ +) + +.PHONY: memleaks +memleaks: $(MEMLEAKS_TARGETS) + + +# helgrind template +define helgrind.tmpl +helgrind-$(1): $(1) +ifdef USE_VALGRIND_XML + valgrind --tool=helgrind --xml=yes --xml-file=$$@.xml ./$$< +else + valgrind --tool=helgrind ./$$< +endif +endef + +# "instanciate" memleak targets +$(foreach testexe,$(TESTEXES), \ + $(eval $(call helgrind.tmpl,$(testexe))) \ +) |