Project

General

Profile

« Previous | Next » 

Revision 629

input.Makefile: Added test that generates VegX.xml

View differences:

input.Makefile
95 95

  
96 96
ifneq ($(wildcard test/),)
97 97

  
98
testOutputs := test/VegBIEN.xml test/import.out
98
testOutputs := test/VegX.xml test/VegBIEN.xml test/import.out
99 99

  
100 100
test: _always $(testOutputs) ;
101 101

  
102
.PRECIOUS: $(testOutputs)
103

  
102 104
all += $(testOutputs)
103 105

  
104
define runTest
106
define test
105 107
env test=1 n=$(test_n) $(1) $(+_)$(if $(2),, >$@) 2>&1$(if $(2), |\
106 108
grep -v -E '^$(2)$$' >$@) || { e=$$?; cat $@; exit $$e;}
107 109
$(DIFF) $@.ref $@
108 110
endef
109 111

  
112
test2File = $(call test,$(map),Processed .* input rows)
113
test2Db = $(call test,$(import))
114

  
115
test/VegX.xml: $(vegxMaps) _always
116
	$(test2File)
117

  
110 118
test/VegBIEN.xml: $(vegbienMaps) _always
111
	$(call runTest,$(map),Processed .* input rows)
112
.PRECIOUS: test/VegBIEN.xml
119
	$(test2File)
113 120

  
114 121
test/import.out: $(vegbienMaps) _always
115
	$(call runTest,$(import))
116
.PRECIOUS: test/import.out
122
	$(test2Db)
117 123

  
118 124
%-ok: _always
119 125
	$(CP) $* $*.ref

Also available in: Unified diff