#!/usr/bin/make -f
# -*- makefile -*-

export PYBUILD_NAME = cinfony

%:
	dh $@ --buildsystem pybuild --with python2

override_dh_clean:
	dh_clean test/*.png
	rm -f $(CURDIR)/debian/tests.out

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	(cd test && PYTHONPATH=.. python testall.py) 2>&1 | tee $(CURDIR)/debian/tests.out
	grep --silent ^FAILED $(CURDIR)/debian/tests.out && /bin/false || /bin/true
endif
