[med-svn] [Git][med-team/bamkit][master] 2 commits: Add autopkgtests

Shruti Sridhar (@shruti_sridhar) gitlab at salsa.debian.org
Wed Aug 4 18:59:23 BST 2021



Shruti Sridhar pushed to branch master at Debian Med / bamkit


Commits:
09150189 by Shruti Sridhar at 2021-08-04T23:28:14+05:30
Add autopkgtests

- - - - -
9f34c752 by Shruti Sridhar at 2021-08-04T23:28:30+05:30
Install docs

- - - - -


4 changed files:

- + debian/README.test
- + debian/docs
- + debian/tests/control
- + debian/tests/run-unit-test


Changes:

=====================================
debian/README.test
=====================================
@@ -0,0 +1,10 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+    sh run-unit-test
+
+in order to confirm its integrity.
+────────────────────────────────────────
+


=====================================
debian/docs
=====================================
@@ -0,0 +1,3 @@
+README.md
+debian/README*
+debian/tests/run-unit-test


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, python3-pysam, samtools
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,27 @@
+#!/bin/bash
+set -e
+
+pkg=bamkit
+examplepkg=samtools
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${examplepkg}/examples/toy.sam "${AUTOPKGTEST_TMP}"
+
+
+cd "${AUTOPKGTEST_TMP}"
+mv -f toy.sam read.sam
+
+cat read.sam| samtools view -Sb > reads.bam
+samtools index reads.bam 
+samtools addreplacerg -r ID:S1 -r LB:L1 -r SM:SAMPLE1 -o output reads.bam
+
+bamlibs.py reads.bam 
+bamcleanheader.py reads.bam > output
+bamfilterrg.py -i reads.bam > filter
+[ -s "output" ] && [ -s "filter" ] || exit 1 && echo "PASS Tests"
+



View it on GitLab: https://salsa.debian.org/med-team/bamkit/-/compare/39bff4ed1e0ba71f8450bfe56706ab776815dba3...9f34c752538191933e8abadca5495daa99fc4f9a

-- 
View it on GitLab: https://salsa.debian.org/med-team/bamkit/-/compare/39bff4ed1e0ba71f8450bfe56706ab776815dba3...9f34c752538191933e8abadca5495daa99fc4f9a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210804/1cc79c12/attachment-0001.htm>


More information about the debian-med-commit mailing list