[med-svn] [python-pysam] 01/01: Tests should not be world writable

Andreas Tille tille at debian.org
Sun Mar 2 00:24:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-pysam.

commit 67f266dd8e4dccc517340d337d105fdf47473930
Author: Andreas Tille <tille at debian.org>
Date:   Sun Mar 2 01:22:12 2014 +0100

    Tests should not be world writable
---
 debian/changelog                        |  6 ++++++
 debian/python-pysam-tests.README.Debian |  4 +++-
 debian/python-pysam-tests.install       |  2 +-
 debian/python-pysam-tests.postinst      | 20 --------------------
 debian/python-pysam-tests.prerm         | 22 ----------------------
 debian/rules                            |  2 +-
 debian/tests/run-unit-test              | 13 ++++++++++++-
 7 files changed, 23 insertions(+), 46 deletions(-)

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 <tille at 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
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 <tille at debian.org>  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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pysam.git



More information about the debian-med-commit mailing list