#
# 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; \
)