#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --disable-gnulib-tests

override_dh_auto_install:
	dh_auto_install
	rm -rf $(CURDIR)/debian/virt-v2v/usr/lib/ocaml

# possibly hangs
export SKIP_TEST_FEDORA_LUKS_ON_LVM_CONVERSION_SH = 1

# UNIX socket path
# '/build/reproducible-path/virt-v2v-2.8.1/debian/.debhelper/generated/_source/home/.config/libvirt/qemu/lib/qmp-ZLLUK3/qmp.monitor'
# is too long
export SKIP_TEST_O_LIBVIRT_SH = 1

# WIN10 test causes QEMU to segfault on ppc64el, hangs on others
export SKIP_TEST_PHONY_WIN10_SH = 1
export SKIP_TEST_PHONY_WIN10_SH = 1
export SKIP_TEST_PHONY_WIN11_SH = 1
export SKIP_TEST_PHONY_WIN2K22_S = 1
export SKIP_TEST_PHONY_WIN2K25_S = 1
export SKIP_TEST_PHONY_WIN7_32_S = 1
export SKIP_TEST_PHONY_WINXP_32.SH = 1
# virt-inspector hangs on armhf
ifneq "" "$(findstring x$(DEB_HOST_ARCH)x,$(patsubst %,x%x,armhf))"
export SKIP_TEST_OPEN_SH = 1
export SKIP_TEST_OPEN_ENCRYPTED_SH = 1
endif

override_dh_auto_test: export LIBGUESTFS_DEBUG=1
override_dh_auto_test: export LIBGUESTFS_TRACE=1
override_dh_auto_test:
ifneq "" "$(findstring x$(DEB_HOST_ARCH)x,$(patsubst %,x%x,amd64 arm64 ppc64el s390x))"
	dh_auto_test
endif
