X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=test%2Fintegration%2Fdumpword%2FMakefile;h=76b5c67277b874398aa82cb76f6b89656946d9fb;hp=745a8a401d5ae508f4f96a299a4479a4777f4e5c;hb=851e22754474ae6518109b5485130dcf86f7f880;hpb=a4a4d9291958ee920beaec963000248b9523389b diff --git a/test/integration/dumpword/Makefile b/test/integration/dumpword/Makefile index 745a8a4..76b5c67 100644 --- a/test/integration/dumpword/Makefile +++ b/test/integration/dumpword/Makefile @@ -6,47 +6,42 @@ # 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 \ - cat <$$target/report.txt >>$(LOGFILE) || echo $$target ": no report"; \ + 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: -ifdef UNITNAME +ifndef UNITNAME + @echo "no test created. set UNITNAME" +else @mkdir $(UNITNAME) @echo 'include ../CMD.mk' >$(UNITNAME)/Makefile; \ echo 'CMD = ./dumpword_$$(UNITNAME).sh' >>$(UNITNAME)/Makefile; \ echo 'include ../TEST.mk' >>$(UNITNAME)/Makefile -else - @echo "no test created. set UNITNAME" endif