#!/usr/bin/make -f

#export DH_VERBOSE = 1
export LC_ALL = C.UTF-8

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# tests steps are described in .travis.yml
	set -e \
	; for PYTHON3 in $(shell py3versions --supported) \
	; do \
		$$PYTHON3 scoary.py \
			-g scoary/exampledata/Gene_presence_absence.csv \
			-t scoary/exampledata/Tetracycline_resistance.csv \
			-o Test1 \
			--no-time \
	;	$$PYTHON3 scoary.py \
			-g scoary/exampledata/Gene_presence_absence.csv \
			-t scoary/exampledata/Tetracycline_resistance.csv \
			--no_pairwise \
			-o Test2 \
			--no-time \
	;	$$PYTHON3 scoary.py \
			-g scoary/exampledata/Gene_presence_absence.csv \
			-t scoary/exampledata/Tetracycline_resistance.csv \
			-r scoary/exampledata/Restrict_to.csv \
			-w -o Test3 --no-time \
	;	$$PYTHON3 scoary.py \
			-g scoary/exampledata/Gene_presence_absence.csv \
			-t scoary/exampledata/Tetracycline_resistance.csv \
			-p 0.01 1E-5 -c B EPW --collapse -m 50 -u \
			-n scoary/exampledata/ExampleTree.nwk \
			--threads 4 -o Test4 --no-time \
	;	$$PYTHON3 scoary/vcf2scoary.py \
			--force scoary/exampledata/Example.vcf \
	;	$$PYTHON3 tests/test_scoary_output.py \
	; done
endif
