#!/usr/bin/make -f

# use local fork of debcargo and dh-cargo
PATH := $(CURDIR)/debian/dh-cargo/bin:$(PATH)
PERL5LIB = $(CURDIR)/debian/dh-cargo/lib
export PATH PERL5LIB

ifneq (,$(filter 32,$(DEB_TARGET_ARCH_BITS)))
TEST_BROKEN = tests::test_try_increment_worker_total tests::worker_count_test
endif

%:
	dh $@ --buildsystem cargo

# TODO: always check all tests when bug#1022895 is resolved
# <https://github.com/robinfriedli/rusty_pool/issues/9>
override_dh_auto_test:
	dh_auto_test -- --no-fail-fast -- \
		$(addprefix --skip ,$(TEST_BROKEN))
