Tests should not be world writable
authorAndreas Tille <tille@debian.org>
Sun, 2 Mar 2014 00:22:12 +0000 (01:22 +0100)
committerAndreas Tille <tille@debian.org>
Sun, 2 Mar 2014 00:22:12 +0000 (01:22 +0100)
debian/changelog
debian/python-pysam-tests.README.Debian
debian/python-pysam-tests.install
debian/python-pysam-tests.postinst [deleted file]
debian/python-pysam-tests.prerm [deleted file]
debian/rules
debian/tests/run-unit-test

index e4657260a03de3d9eeb4f6245a0cb83cc99603db..aed98f620f14016770077cb6882443a7718950fb 100644 (file)
@@ -1,3 +1,9 @@
+python-pysam (0.7.5-3) UNRELEASED; urgency=medium
+
+  * Do not install tests in world writable dir
+
+ -- Andreas Tille <tille@debian.org>  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
index 6ec9300ac7a05f3a10c8a94ec9725fbd2a25d338..61a30cd96f38bdbc50b90976656021f2c351ca80 100644 (file)
@@ -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 <tille@debian.org>  Fri, 07 Feb 2014 18:29:40 +0100
index 5717f36c8a2757d88d736afdbf6b148bac356bfd..a99a5780036fc700aafe73a43b49e7ce09f496ac 100644 (file)
@@ -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 (file)
index b9d63dd..0000000
+++ /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 (file)
index 6c79f5d..0000000
+++ /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
index 2263b14b0ae9cc26c03c3d51908d4a7fac3be3b7..2a1961aa6c247ee69ae69dd966ffcaf19ad4d9e0 100755 (executable)
@@ -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
index ffba74b089fd8408e3335df33b2b6683aee79485..50eac1fac2443ee98dd7bea56b2929f0865e92c2 100644 (file)
@@ -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