1 ##===- TEST.simple.Makefile -------------------------------*- Makefile -*--===##
3 # This test is used in conjunction with the llvm/utils/NightlyTest* stuff to
4 # generate information about program status for the nightly report.
6 ##===----------------------------------------------------------------------===##
8 CURDIR := $(shell cd .; pwd)
9 PROGDIR := $(PROJ_SRC_ROOT)
10 RELDIR := $(subst $(PROGDIR),,$(CURDIR))
12 REPORTS_TO_GEN := compile exec
13 REPORTS_SUFFIX := $(addsuffix .report.txt, $(REPORTS_TO_GEN))
15 #$(PROGRAMS_TO_TEST:%=Output/%.simple.compile.report.txt): \
16 #Output/%.simple.compile.report.txt: Output/%.out-simple
18 # @printf "TEST-RESULT-compile-time: " >> $@
19 # -grep "^program" Output/$*.simple.compile.time >> $@
21 $(PROGRAMS_TO_TEST:%=Output/%.simple.compile.report.txt): \
22 Output/%.simple.compile.report.txt: Output/%.out-simple
24 @-if test -f Output/$*.simple; then \
25 echo "TEST-PASS: compile $(RELDIR)/$*" >> $@; \
26 echo "TEST-RESULT-compile-success: pass" >> $@;\
28 echo "TEST-FAIL: compile $(RELDIR)/$*" >> $@; \
30 @-printf "TEST-RESULT-compile-time: " >> $@
31 @-grep "^program" Output/$*.simple.compile.time >> $@
33 $(PROGRAMS_TO_TEST:%=Output/%.simple.exec.report.txt): \
34 Output/%.simple.exec.report.txt: Output/%.exe-simple
37 for i in $(EXEC_XFAILS); do \
38 if test "$*" == $$i; then \
42 if test $$is_xfail == 1; then \
43 echo "TEST-XFAIL: exec $(RELDIR)/$*" >> $@;\
44 echo "TEST-RESULT-exec-success: xfail" >> $@;\
45 elif test -f Output/$*.exe-simple; then \
46 echo "TEST-PASS: exec $(RELDIR)/$*" >> $@;\
47 echo "TEST-RESULT-exec-success: pass" >> $@;\
49 echo "TEST-FAIL: exec $(RELDIR)/$*" >> $@;\
51 @-printf "TEST-RESULT-exec-time: " >> $@
52 @-grep "^program" Output/$*.out-simple.time >> $@
53 if test -f Output/$*.extra-results.txt; then \
54 $(PROGDIR)/ParseMultipleResults $(RELDIR)/$* Output/$*.extra-results.txt >> $@; \
57 # Overall tests: just run subordinate tests
58 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
59 Output/%.$(TEST).report.txt: $(addprefix Output/%.simple., $(REPORTS_SUFFIX))
61 @echo "---------------------------------------------------------------" >> $@
62 @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
63 @echo "---------------------------------------------------------------" >> $@
64 -cat $(addprefix Output/$*.simple., $(REPORTS_SUFFIX)) >> $@
66 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
67 test.$(TEST).%: Output/%.$(TEST).report.txt