X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=test%2Fintegration%2Fcomet2%2FMakefile;h=2da745247551ea4021cb9ca1e2c9f8df870069bb;hp=aa6807be6938d20f688023e31f1429030557a861;hb=4895ccd356b01a8a984eded115531c45b0e40004;hpb=b2ffb8eaafe3d8de6e9d6674d45ff97ef2874019 diff --git a/test/integration/comet2/Makefile b/test/integration/comet2/Makefile index aa6807b..2da7452 100644 --- a/test/integration/comet2/Makefile +++ b/test/integration/comet2/Makefile @@ -6,41 +6,36 @@ # make cleanall: すべてのテストで、「make」と「make prepare」で生成されたファイルをクリア # make prepare : すべてのテストの、想定結果を出力 # make create : UNITNAMEで指定されたテストを新規に作成 +GROUPNAME = `pwd | xargs basename` TESTS = `ls | grep "^[^A-Z].*"` LOGFILE = Test.log -.PHONY: all check report clean cleanall prepare create -all: check report -check: +.PHONY: all check checkeach report clean cleanall prepare create +check: checkeach report +checkeach: @rm -f $(LOGFILE) @for target in $(TESTS); do \ $(MAKE) check -C $$target; \ done $(LOGFILE): @for target in $(TESTS); do \ - if test -s $^; then cat <$$target/report.txt >>$(LOGFILE); else echo "Failure:" $$target "no report" >>$(LOGFILE); fi; \ + cat <$$target/report.txt >>$(LOGFILE) || echo $$target ": no report" >>$(LOGFILE); \ done report: $(LOGFILE) @success=`grep "Success" $(LOGFILE) | wc -l`; \ all=`cat $(LOGFILE) | wc -l`; \ - echo "$$success / $$all tests passed. Details in `pwd`/$(LOGFILE)"; \ + echo "$(GROUPNAME): $$success / $$all tests passed. Details in `pwd`/$(LOGFILE)"; \ if test $$success -eq $$all; then \ - echo "All tests are succeded."; \ + echo "$(GROUPNAME): All tests are succeded."; \ fi clean: - @for target in $(TESTS); do \ - $(MAKE) clean -C $$target; \ - done + @for target in $(TESTS); do $(MAKE) clean -C $$target; done @rm -f $(LOGFILE) cleanall: - @for target in $(TESTS); do \ - $(MAKE) cleanall -C $$target; \ - done + @for target in $(TESTS); do $(MAKE) cleanall -C $$target; done @rm -f $(LOGFILE) prepare: - @for target in $(TESTS) ; do \ - $(MAKE) prepare -C $$target ;\ - done + @for target in $(TESTS) ; do $(MAKE) prepare -C $$target ; done create: ifndef UNITNAME @echo "no test created. set UNITNAME" @@ -61,7 +56,7 @@ ifdef INFILE endif @echo -n 'EXECCMD = $$(COMET2) $$(COMET2FLAG) $$(OBJFILE)' >>$(UNITNAME)/Makefile ifdef INFILE - @echo '< $(INFILE)' >>$(UNITNAME)/Makefile + @echo '< $$(INFILE)' >>$(UNITNAME)/Makefile endif @echo >>$(UNITNAME)/Makefile; \ echo 'include ../TEST.mk' >>$(UNITNAME)/Makefile