Skip to content
Commits on Source (2)
......@@ -5,6 +5,8 @@ q2-metadata (2019.7.0+dfsg-1) UNRELEASED; urgency=medium
* Standards-Version: 4.4.0
* Respect DEB_BUILD_OPTIONS in override_dh_auto_test target
* Specify the required version of qiime, q2templates, and q2-types
* Fix typos in d/rules (should be js instead of css)
* Add autopkgtest (run build-time tests for the moment)
-- Liubov Chuprikova <chuprikovalv@gmail.com> Fri, 06 Sep 2019 14:32:02 +0200
......
......@@ -5,15 +5,14 @@ export LC_ALL=C.UTF-8
# we need datatables.min.js for the tests
export PYBUILD_BEFORE_TEST=ln -s \
/usr/share/javascript/jquery-datatables/css/jquery.dataTables.min.css \
/usr/share/javascript/jquery-datatables/jquery.dataTables.min.js \
{build_dir}/q2_metadata/templates/tabulate/datatables.min.js
export PYBUILD_BEFORE_INSTALL=rm -vf {build_dir}/.coverage*; \
rm {build_dir}/q2_metadata/templates/tabulate/datatables.min.js
export PYBUILD_BEFORE_INSTALL=rm -vf {build_dir}/.coverage*
export PYBUILD_AFTER_INSTALL=ln -s \
/usr/share/javascript/jquery-datatables/css/jquery.dataTables.min.css \
{destdir}/{install_dir}/q2_metadata/templates/tabulate/datatables.min.js
export PYBUILD_AFTER_INSTALL=ln -vsf \
/usr/share/javascript/jquery-datatables/jquery.dataTables.min.js \
/{destdir}/{install_dir}/q2_metadata/templates/tabulate/datatables.min.js
%:
dh $@ --with python3 --buildsystem=pybuild
......
Tests: run-unit-test
Depends: @
Depends: @, python3-pytest-cov
Restrictions: allow-stderr
#!/bin/bash
set -e
pkg=#PACKAGENAME#
pkg=q2_metadata
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}"
cp -Lr /usr/lib/python3/dist-packages/${pkg}* "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}"
#do_stuff_to_test_package#
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
# Run build-time tests
py.test-3 --cov=${pkg}