[med-svn] [Git][med-team/q2-taxa][master] Add autopkgtest
Liubov Chuprikova
gitlab at salsa.debian.org
Wed Jul 17 12:00:46 BST 2019
Liubov Chuprikova pushed to branch master at Debian Med / q2-taxa
Commits:
adb920ec by Liubov Chuprikova at 2019-07-17T11:00:01Z
Add autopkgtest
just run build-time tests for now
- - - - -
2 changed files:
- + debian/tests/control
- + debian/tests/run-unit-test
Changes:
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, python3-pytest-cov
+Restrictions: allow-stderr
=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -e
+
+pkg=q2_taxa
+
+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/lib/python3/dist-packages/${pkg}* "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+if [ ! -f /usr/lib/python3/dist-packages/pytest_cov/__init__.py ] ; then
+ echo "Please install package python3-pytest-cov to run this script"
+ exit 1
+fi
+
+# one of the tests need the directory that doesn't exist for some reason
+mkdir -v q2_taxa/assets/barplot/dist
+
+# Run build-time tests
+py.test-3 --cov=${pkg}
View it on GitLab: https://salsa.debian.org/med-team/q2-taxa/commit/adb920ece996ecce516cccb4d7a5558064c7d4bd
--
View it on GitLab: https://salsa.debian.org/med-team/q2-taxa/commit/adb920ece996ecce516cccb4d7a5558064c7d4bd
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/20190717/c1d5d20c/attachment-0001.html>
More information about the debian-med-commit
mailing list