#!/usr/bin/make -f # DH_VERBOSE := 1 include /usr/share/dpkg/default.mk export JAVA_HOME=/usr/lib/jvm/default-java export LC_ALL=C.UTF-8 %: dh $@ --with javahelper override_dh_clean: # Removing the unit tests we copied into a subdirectory of src/test. if [ -e src/test/java/org ]; then \ $(RM) -rf src/test/java/org; \ fi # Removing all the sidx files created during the tests. Then one of them must # be restored, it has been saved prior to the tests. find . \( -name "*.sidx" -a ! -name "gnomad_db_multiple_entries.vcf.sidx" \) -delete if [ -e test/ann/gnomad_db_multiple_entries.vcf.sidx.old ]; then \ mv test/ann/gnomad_db_multiple_entries.vcf.sidx.old test/ann/gnomad_db_multiple_entries.vcf.sidx; \ fi # Restoring another file modified during the tests if [ -e test/gt_test.01.gt.vcf.old ]; then \ mv test/gt_test.01.gt.vcf.old test/gt_test.01.gt.vcf; \ fi dh_clean override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) # Saving some files that are modified during the tests, in order to restore them later. cp test/ann/gnomad_db_multiple_entries.vcf.sidx test/ann/gnomad_db_multiple_entries.vcf.sidx.old cp test/gt_test.01.gt.vcf test/gt_test.01.gt.vcf.old # Moving the unit tests into a subdir of src/test so that Maven sees them. mkdir -p src/test/java/org/snpsift/testCases cp -a src/main/java/org/snpsift/testCases/unit src/test/java/org/snpsift/testCases dh_auto_test endif