cubicweb/skeleton/debian/tests/pytest
author Jérémy Bobbio <jeremy.bobbio@irq7.fr>
Wed, 19 Jun 2019 09:51:38 +0200
changeset 12663 853e73456d0f
child 12709 280c9db41038
permissions -rw-r--r--
[skeleton] Update Debian packaging template Here are multiple updates to the Debian packaging template provided when running `cubicweb-ctl newcube`: * Switch to source format 3.0 (quilt). * Switch to debhelper 9. * Switch to dh-python. * Switch to Python 3. * Name the binary package `python3-cubicweb-CUBENAME` instead of just `cubicweb-CUBENAME` (which is still the source package). * Populate Depends using dh_python3 support for Python requirements. * Run test suite at build time using pytest. * Add autopkgtest to run test suite against the installed package. * Bump Standards-Version to 4.3.0.

#!/bin/sh

set -e
set -x

### Setup tests

# Uncomment if tests require database access
#service postgresql restart || service postgresql start
#trap 'service postgresql stop' EXIT

cp -r test tox.ini "$AUTOPKGTEST_TMP"
chown -R nobody:nogroup "$AUTOPKGTEST_TMP"

### Run tests

for py in $(py3versions -r 2>/dev/null); do
	cd "$AUTOPKGTEST_TMP"
	echo "Testing with $py:"
	su nobody --shell /bin/sh \
		-c "$py -m pytest -v"
done