[r60]: / trunk / wharfie / Makefile  Maximize  Restore  History

Download this file

30 lines (24 with data), 620 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# Wharfie Makefile
# Used just for test and install, as wharfie is a pure python script,
# which can be used in place.
#

ifeq (${TEST},)
	TESTS=$(addsuffix result.tar, $(wildcard tests/*/))
else
	TESTS=tests/${TEST}/result.tar
endif

help:
	@echo "make <target>:"
	@echo "- test: Execute all tests from the subfolder tests/"
	@echo "- test TEST=<name>: Execute only the test in the folder specified by the TEST variable"

test: ${TESTS}


%/result.tar:
	( \
	    echo "Entering $*..."; \
	    cd $*; \
		echo "Running test..."; \
	    ../../wharfie.py; \
		echo "Checking result."; \
	    [ ! -f $@ ] && exit 1; \
	)