Project

General

Profile

« Previous | Next » 

Revision 4120

View differences:

input.Makefile
112 112
fullViaMap := src/%/map.full.csv
113 113
directMap := src/%/VegBIEN.csv
114 114
anyMap := $(srcMap) $(viaMap) $(fullViaMap) $(directMap)
115
srcsOnly = $(filter-out $(anyMap),$(1))
116 115

  
116
anyTest = src/$*/test.%
117
srcsOnly = $(filter-out $(anyMap) $(anyTest),$(1))
118

  
117 119
via := Veg+
118 120

  
119 121
coreMap := $(mappings)/$(via)-VegBIEN.csv
......
348 350

  
349 351
tests :=
350 352

  
351
test/import.%.xml: src/%/VegBIEN.csv _always
353
src/%/test.xml: src/%/VegBIEN.csv _always
352 354
	$(test2Db)
353
tests += test/import.%.xml
355
tests += src/%/test.xml
354 356

  
355 357
testStaged2Db = $(foreach use_staged,1,$(test2Db))
356 358
    # run with use_staged=1
357 359

  
358 360
# Requires staging tables. To create them, run `make inputs/<datasrc>/install`.
359
test/import.%.staging.xml: src/%/VegBIEN.csv _always
361
src/%/test.staging.xml: src/%/VegBIEN.csv _always
360 362
	-$(if $(isCsv),$(testStaged2Db),cp -p $(@:.staging.xml=.xml) $@)
361 363
# Don't abort tester if only staging test fails, in case staging table missing
362 364
# Non-flat-file inputs fall back to mimicking a successful test
363
tests += test/import.%.staging.xml
365
tests += src/%/test.staging.xml
364 366

  
365 367
testOutputs := $(foreach test,$(tests),$(tables:%=$(test)))
366 368

  
......
368 370

  
369 371
test: _always $(testOutputs) ;
370 372

  
371
all += $(filter-out %.ref,$(wildcard test/*))
373
all += $(wildcard src/%/test*.xml)
372 374

  
373 375
# Accepts a test output: make <test_output_path>-ok
374 376
%-ok: _always
375 377
	$(CP) $* $(call testRef,$*)
376 378

  
377
test/accept-all: _always
379
accept-all: _always
378 380
	+yes|$(selfMake) test
379 381

  
380 382
##### Documentation

Also available in: Unified diff