projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ドキュメント作成
[YACASL2.git]
/
test
/
integration
/
comet2
/
Makefile
diff --git
a/test/integration/comet2/Makefile
b/test/integration/comet2/Makefile
index
c90f916
..
aa6807b
100644
(file)
--- a/
test/integration/comet2/Makefile
+++ b/
test/integration/comet2/Makefile
@@
-7,7
+7,7
@@
# make prepare : すべてのテストの、想定結果を出力
# make create : UNITNAMEで指定されたテストを新規に作成
TESTS = `ls | grep "^[^A-Z].*"`
# make prepare : すべてのテストの、想定結果を出力
# make create : UNITNAMEで指定されたテストを新規に作成
TESTS = `ls | grep "^[^A-Z].*"`
-LOGFILE = T
EST
.log
+LOGFILE = T
est
.log
.PHONY: all check report clean cleanall prepare create
all: check report
.PHONY: all check report clean cleanall prepare create
all: check report
@@
-18,7
+18,7
@@
check:
done
$(LOGFILE):
@for target in $(TESTS); do \
done
$(LOGFILE):
@for target in $(TESTS); do \
-
cat <$$target/report.txt >>$(LOGFILE)
; \
+
if test -s $^; then cat <$$target/report.txt >>$(LOGFILE); else echo "Failure:" $$target "no report" >>$(LOGFILE); fi
; \
done
report: $(LOGFILE)
@success=`grep "Success" $(LOGFILE) | wc -l`; \
done
report: $(LOGFILE)
@success=`grep "Success" $(LOGFILE) | wc -l`; \
@@
-26,8
+26,6
@@
report: $(LOGFILE)
echo "$$success / $$all tests passed. Details in `pwd`/$(LOGFILE)"; \
if test $$success -eq $$all; then \
echo "All tests are succeded."; \
echo "$$success / $$all tests passed. Details in `pwd`/$(LOGFILE)"; \
if test $$success -eq $$all; then \
echo "All tests are succeded."; \
- else \
- grep "Failure" $(LOGFILE); \
fi
clean:
@for target in $(TESTS); do \
fi
clean:
@for target in $(TESTS); do \
@@
-44,29
+42,27
@@
prepare:
$(MAKE) prepare -C $$target ;\
done
create:
$(MAKE) prepare -C $$target ;\
done
create:
-ifdef UNITNAME
+ifndef UNITNAME
+ @echo "no test created. set UNITNAME"
+else
@mkdir $(UNITNAME)
@echo 'include ../CMD.mk # YACASL2DIR, CASL2, COMET2' >$(UNITNAME)/Makefile
@mkdir $(UNITNAME)
@echo 'include ../CMD.mk # YACASL2DIR, CASL2, COMET2' >$(UNITNAME)/Makefile
-ifdef CASL2FLAG
- @echo 'CASL2FLAG = $(CASL2FLAG)' >>$(UNITNAME)/Makefile
-else
- @echo 'CASL2FLAG = -la' >>$(UNITNAME)/Makefile
+ifdef COMET2FLAG
+ @echo 'COMET2FLAG = $(COMET2FLAG)' >>$(UNITNAME)/Makefile
endif
endif
-ifdef ASDIR
- @echo 'ASDIR = $(ASDIR)' >>$(UNITNAME)/Makefile
-else
@echo 'ASDIR = $$(YACASL2DIR)/as' >>$(UNITNAME)/Makefile
@echo 'ASDIR = $$(YACASL2DIR)/as' >>$(UNITNAME)/Makefile
-endif
+ @echo 'CASL2LIBDIR = $$(YACASL2DIR)/as/casl2lib' >>$(UNITNAME)/Makefile
ifdef ASFILE
@echo 'ASFILE = $(ASFILE)' >>$(UNITNAME)/Makefile
ifdef ASFILE
@echo 'ASFILE = $(ASFILE)' >>$(UNITNAME)/Makefile
-else
- @echo 'ASFILE = $$(ASDIR)/$(UNITNAME).casl' >>$(UNITNAME)/Makefile
endif
endif
+ @echo 'ASCMD = $$(CASL2) $$(CASL2FLAG) -O $(ASFILE)' >>$(UNITNAME)/Makefile
+ifdef INFILE
+ @echo 'INFILE = $$(INFILE)' >>$(UNITNAME)/Makefile
+endif
+ @echo -n 'EXECCMD = $$(COMET2) $$(COMET2FLAG) $$(OBJFILE)' >>$(UNITNAME)/Makefile
ifdef INFILE
ifdef INFILE
- @echo '
IN = <
$(INFILE)' >>$(UNITNAME)/Makefile
+ @echo '
<
$(INFILE)' >>$(UNITNAME)/Makefile
endif
endif
- @echo
'CMD = $$(COMET2) $$(COMET2FLAG) $$(UNITNAME).o $$(IN)'
>>$(UNITNAME)/Makefile; \
+ @echo >>$(UNITNAME)/Makefile; \
echo 'include ../TEST.mk' >>$(UNITNAME)/Makefile
echo 'include ../TEST.mk' >>$(UNITNAME)/Makefile
-else
- @echo "no test created. set UNITNAME"
endif
endif