#!/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

TEST_BROKEN = \
 accept_headers_populated_by_default \
 header_can_be_inserted_in_httpclient_builder \
 headers_in_request_builder_must_override_headers_in_httpclient_builder \
 headers_in_request_builder_must_override_multiple_headers_in_httpclient_builder \
 multiple_headers_with_same_key_can_be_inserted_in_httpclient_builder \
 deflate_encoded_response_is_decoded_automatically \
 gzip_encoded_response_is_decoded_automatically

%:
	dh $@ --buildsystem cargo

# avoid checking examples, too broken (possibly due to use of newer tiny-http)
override_dh_auto_test:
	dh_auto_test -- --lib --bins --tests --benches --no-fail-fast -- $(addprefix --skip ,$(TEST_BROKEN))
