Revision 876
Added by Aaron Marcuse-Kubitza almost 13 years ago
input.Makefile | ||
---|---|---|
158 | 158 |
|
159 | 159 |
ifneq ($(wildcard test/),) |
160 | 160 |
|
161 |
tests := |
|
162 |
|
|
163 | 161 |
hasOwnRef = $(filter-out %.2-step.xml,$@) |
164 | 162 |
testRef = $(1:.2-step.xml=.xml).ref |
165 | 163 |
|
... | ... | |
181 | 179 |
|
182 | 180 |
test2File = $(call test,$(map)) |
183 | 181 |
|
184 |
test/$(via).xml: $(viaMaps) _always |
|
182 |
tests := |
|
183 |
|
|
184 |
test/$(via).%.xml: maps/$(via).%.csv _always |
|
185 | 185 |
$(test2File) |
186 |
tests += test/$(via).xml |
|
186 |
tests += test/$(via).%.xml
|
|
187 | 187 |
|
188 |
test/VegBIEN.xml: $(directMaps) _always
|
|
188 |
test/VegBIEN.%.xml: maps/VegBIEN.%.csv _always
|
|
189 | 189 |
$(test2File) |
190 |
tests += test/VegBIEN.xml |
|
190 |
tests += test/VegBIEN.%.xml
|
|
191 | 191 |
|
192 |
test/VegBIEN.2-step.xml: test/$(via).xml $(mainCoreMap) _always
|
|
192 |
test/VegBIEN.%.2-step.xml: test/$(via).%.xml $(mainCoreMap) _always
|
|
193 | 193 |
-$(test2File) |
194 | 194 |
# Don't abort tester if only 2-step test fails, as it's often finicky |
195 |
tests += test/VegBIEN.2-step.xml |
|
195 |
tests += test/VegBIEN.%.2-step.xml
|
|
196 | 196 |
|
197 |
test/import.out: $(directMaps) _always
|
|
197 |
test/import.%.out: maps/VegBIEN.%.csv _always
|
|
198 | 198 |
$(call test,$(map2db)) |
199 |
tests += test/import.out |
|
199 |
tests += test/import.%.out
|
|
200 | 200 |
|
201 |
test: _always $(tests) ; |
|
202 |
|
|
203 | 201 |
.PRECIOUS: $(tests) |
204 | 202 |
|
205 |
all += $(tests)
|
|
203 |
testOutputs := $(foreach test,$(tests),$(tables:%=$(test)))
|
|
206 | 204 |
|
205 |
test: _always $(testOutputs) ; |
|
206 |
|
|
207 |
all += $(testOutputs) |
|
208 |
|
|
207 | 209 |
# Accepts a test output: make <test_output_path>-ok |
208 | 210 |
%-ok: _always |
209 | 211 |
$(CP) $* $(call testRef,$*) |
Also available in: Unified diff
input.Makefile: Run separate tests for each map spreadsheet (input table) rather than all tables at once. This will make it possible to test CSV inputs, which have one CSV per table.