#!/usr/bin/make -f

export PYBUILD_NAME=libcloud

export PYBUILD_BEFORE_TEST=./debian/setup-test-env.sh {build_dir}
export PYBUILD_AFTER_TEST=rm -f {build_dir}/libcloud/test/secrets.py

# Disable tests requiring network access. The upstream test-suite honors the
# NO_NETWORK variable.
export NO_NETWORK=

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_install:
	rm -rf $(CURDIR)/debian/python3-libcloud/usr/lib/python3.*/dist-packages/libcloud/test

override_dh_auto_test:
	dh_auto_test -O--buildsystem=pybuild -- --test-pytest --test-args "-m 'not serial'"
	dh_auto_test -O--buildsystem=pybuild -- --test-pytest --test-args "-m 'serial'"
