cubicweb/skeleton/debian/tests/pytest
branch3.26
changeset 12689 376168d1b14a
child 12709 280c9db41038
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/debian/tests/pytest	Wed Jul 10 14:57:58 2019 +0200
@@ -0,0 +1,22 @@
+#!/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 $(pyversions -r 2>/dev/null) $(py3versions -r 2>/dev/null); do
+       cd "$AUTOPKGTEST_TMP"
+       echo "Testing with $py:"
+       su nobody --shell /bin/sh \
+               -c "$py -m pytest -v"
+done