From: Andreas Tille Date: Sun, 2 Mar 2014 00:22:12 +0000 (+0100) Subject: Tests should not be world writable X-Git-Tag: archive/raspbian/0.22.0+ds-1+rpi1~1^2^2~397 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=67f266dd8e4dccc517340d337d105fdf47473930;p=python-pysam.git Tests should not be world writable --- diff --git a/debian/changelog b/debian/changelog index e465726..aed98f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-pysam (0.7.5-3) UNRELEASED; urgency=medium + + * Do not install tests in world writable dir + + -- Andreas Tille Sat, 01 Mar 2014 23:40:21 +0100 + python-pysam (0.7.5-2) unstable; urgency=medium * debian/rules: Set PYTHONPATH correctly using dh_python diff --git a/debian/python-pysam-tests.README.Debian b/debian/python-pysam-tests.README.Debian index 6ec9300..61a30cd 100644 --- a/debian/python-pysam-tests.README.Debian +++ b/debian/python-pysam-tests.README.Debian @@ -4,7 +4,9 @@ Pysam for Debian To verify whether your python-pysam modules are working correctly you can run the test suite manually via - cd /var/lib/pysam/tests + cp -a /usr/share/doc/python-pysam/tests /tmp + cd /tmp/tests + gunzip -r * ./pysam_test.py -- Andreas Tille Fri, 07 Feb 2014 18:29:40 +0100 diff --git a/debian/python-pysam-tests.install b/debian/python-pysam-tests.install index 5717f36..a99a578 100644 --- a/debian/python-pysam-tests.install +++ b/debian/python-pysam-tests.install @@ -1 +1 @@ -tests var/lib/pysam +tests usr/share/doc/python-pysam diff --git a/debian/python-pysam-tests.postinst b/debian/python-pysam-tests.postinst deleted file mode 100644 index b9d63dd..0000000 --- a/debian/python-pysam-tests.postinst +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - configure) - chmod a+w /var/lib/pysam/tests - chmod a+w /var/lib/pysam/tests/*.[bs]am* - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# diff --git a/debian/python-pysam-tests.prerm b/debian/python-pysam-tests.prerm deleted file mode 100644 index 6c79f5d..0000000 --- a/debian/python-pysam-tests.prerm +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - purge|remove|upgrade) - if [ -e /var/lib/pysam/tests/Makefile ] ; then - cd /var/lib/pysam/tests; make clean; rm -f log.txt - fi - ;; - failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index 2263b14..2a1961a 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ endif override_dh_install-indep: dh_install -p $(TESTPKG) - cd debian/$(TESTPKG)/var/lib/pysam/tests; \ + cd debian/$(TESTPKG)/usr/share/doc/python-pysam/tests; \ make clean; \ rm -f log.txt ; \ chmod a+x tabix_test.py diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test index ffba74b..50eac1f 100644 --- a/debian/tests/run-unit-test +++ b/debian/tests/run-unit-test @@ -1,4 +1,15 @@ #!/bin/sh -e -cd /var/lib/pysam/tests +cp -a /usr/share/doc/python-pysam/tests /tmp +cd /tmp/tests +gunzip -r *.py.gz \ + ex10.bam.gz \ + ex9_fail.bam.gz \ + ex9_nofail.bam.gz \ + example_bai.bam.gz \ + example_empty_header.bam.gz \ + example_unmapped_reads_no_sq.bam.gz \ + example_user_header.bam.gz \ + issue100.bam.gz +chmod u+x ./pysam_test_offline.py ./pysam_test_offline.py