#!/usr/bin/make -f PYTHONS:=$(shell pyversions -vr) include /usr/share/openstack-pkg-tools/pkgos.make %: dh $@ --buildsystem=python_distutils --with python2 override_dh_install: dh_install rm -rf debian/swift-bench/usr/lib/python*/dist-packages/tests install -D -m 0644 $(CURDIR)/etc/swift-bench.conf-sample $(CURDIR)/debian/swift-bench/etc/swift/swift-bench.conf override_dh_clean: dh_clean rm -rf .testrepository override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. python setup.py testr @echo "===> Running tests" set -e ; set -x ; for i in $(PYTHONS) ; do \ PYMAJOR=`echo $$i | cut -d'.' -f1` ; \ echo "===> Testing with python$$i (python$$PYMAJOR)" ; \ rm -rf .testrepository ; \ testr-python$$PYMAJOR init ; \ TEMP_REZ=`mktemp -t` ; \ PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \ cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \ rm -f $$TEMP_REZ ; \ testr-python$$PYMAJOR slowest ; \ done endif override_dh_missing: dh_missing --fail-missing