#!/usr/bin/make -f

%:
	dh $@ --with python3 --buildsystem=pybuild

execute_before_dh_installman:
	go-md2man -in=README.md -out=debian/walinuxagent.1

override_dh_installsystemd:
	# remove service placed in the wrong path by upstream install
	rm -f debian/walinuxagent/lib/systemd/system/walinuxagent.service
	dh_installsystemd --name walinuxagent --no-stop-on-upgrade walinuxagent.service
	dh_installsystemd --name walinuxagent --no-stop-on-upgrade ephemeral-disk-warning.service

override_dh_python3:
	dh_python3 -O--buildsystem=pybuild --shebang "/usr/bin/env python3"

override_dh_auto_test:
	pytest --ignore-glob '*/test_cgroupconfigurator_sudo.py' --deselect 'tests/common/utils/test_text_util.py::TestTextUtil::test_get_password_hash' --verbose tests
