[med-svn] [Git][med-team/filtlong][master] Add autopkgtests

Pranav Ballaney gitlab at salsa.debian.org
Thu May 14 21:22:34 BST 2020



Pranav Ballaney pushed to branch master at Debian Med / filtlong


Commits:
dbcb5df9 by Pranav Ballaney at 2020-05-15T01:52:10+05:30
Add autopkgtests

- - - - -


5 changed files:

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


Changes:

=====================================
debian/README.test
=====================================
@@ -0,0 +1,8 @@
+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/filtlong.docs
=====================================
@@ -1,2 +1,4 @@
 README*
 misc
+debian/tests/run-unit-test
+debian/tests/README.test
\ No newline at end of file


=====================================
debian/filtlong.examples
=====================================
@@ -0,0 +1 @@
+test/*fast*
\ No newline at end of file


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


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,87 @@
+#!/bin/bash
+set -e
+
+pkg=filtlong
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  # Double quote below to expand the temporary directory variable now versus
+  # later is on purpose.
+  # shellcheck disable=SC2064
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+echo -e "\e[93m\e[1mTest 1\e[0m"
+filtlong --keep_percent 75 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 2\e[0m"
+filtlong --min_length 10 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 3\e[0m"
+filtlong --min_length 1 -a test_reference.fasta test_split.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 4\e[0m"
+filtlong --min_length 1000 --window_size 10 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 5\e[0m"
+filtlong --min_mean_q 5 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 6\e[0m"
+filtlong --min_window_q 5 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 7\e[0m"
+filtlong --target_bases 10000 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 8\e[0m"
+filtlong -1 test_reference_1.fastq.gz -2 test_reference_2.fastq.gz --split 25 test_split.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 9\e[0m"
+filtlong -1 test_reference_1.fastq.gz -2 test_reference_2.fastq.gz --target_bases 10000 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 10\e[0m"
+filtlong -1 test_reference_1.fastq.gz -2 test_reference_2.fastq.gz --trim test_trim.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 11\e[0m"
+filtlong -a test_reference.fasta --split 250 test_split.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 12\e[0m"
+filtlong -a test_reference.fasta --target_bases 1 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 13\e[0m"
+filtlong -a test_reference.fasta --target_bases 10000 test_sort.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
+
+echo -e "\e[93m\e[1mTest 14\e[0m"
+filtlong -a test_reference.fasta --trim test_trim.fastq > temp.fastq
+echo -e "\e[92m\e[1mPassed\e[0m"
+echo
\ No newline at end of file



View it on GitLab: https://salsa.debian.org/med-team/filtlong/-/commit/dbcb5df925a34a213495d42abc3a4422f9850a48

-- 
View it on GitLab: https://salsa.debian.org/med-team/filtlong/-/commit/dbcb5df925a34a213495d42abc3a4422f9850a48
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/20200514/011e9e84/attachment-0001.html>


More information about the debian-med-commit mailing list