Commit 0db613fe authored by Liubov Chuprikova's avatar Liubov Chuprikova
Browse files

Add autopkgtest

run build-time tests for now
parent 84613a21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
Tests: run-unit-test
Depends: @
Depends: @, python3-nose
Restrictions: allow-stderr
+9 −6
Original line number Diff line number Diff line
#!/bin/bash
set -e

pkg=#PACKAGENAME#
pkg=q2_quality_filter

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 -a /usr/lib/python3/dist-packages/${pkg}* "${AUTOPKGTEST_TMP}"

cd "${AUTOPKGTEST_TMP}"

#do_stuff_to_test_package#
if [ ! -e /usr/bin/nosetests3 ] ; then
	echo "Please install package python3-nose to run this script"
	exit 1
fi

# Run build-time tests
nosetests3