Project

General

Profile

« Previous | Next » 

Revision 648

input.Makefile: Also print message for accepting test output when diff fails

View differences:

input.Makefile
117 117
testRef = $(1:.2-step.xml=.xml).ref
118 118

  
119 119
define test
120
@(set -o pipefail -x; env test=1 n=$(test_n) $(1) $(if $(+in),<$(+in)) $(+maps)\
121
$(if $(2),,>$@) 2>&1 $(if $(2),| grep -v -E '^$(2)$$' >$@)) ||\
122
{ e=$$?; cat $@; echo $(emph)"To accept new test output:"$(endEmph);\
120
@{\
121
(set -o pipefail;\
122
(set -x; env test=1 n=$(test_n) $(1) $(if $(+in),<$(+in))\
123
$(+maps) $(if $(2),,>$@) 2>&1)\
124
$(if $(2),| grep -v -E '^$(2)$$' >$@) || { e=$$?; cat $@; exit $$e;})\
125
&& $(DIFF) $(call testRef,$@) $@;\
126
} || { e=$$?; echo $(emph)"To accept new test output:"$(endEmph);\
123 127
echo "$(MAKE) $@-ok --directory=$(realpath .) --makefile=../input.Makefile";\
124 128
exit $$e;}
125
$(DIFF) $(call testRef,$@) $@
126 129
endef
127 130

  
128 131
test2File = $(call test,$(map),Processed .* input rows)

Also available in: Unified diff