[pkg] Run all unit tests in autopkgtest
authorJérémy Bobbio <jeremy.bobbio@irq7.fr>
Tue, 09 Jul 2019 11:13:08 +0200
changeset 12684 d464495452aa
parent 12683 d77afae12d45
child 12685 84a8a8915512
[pkg] Run all unit tests in autopkgtest We previously forgot to copy `tox.ini` alongside the tests. As this file configures pytest pattern matching rules, we were not running quite a few tests. This is now fixed. The added tests required some adjustments in the Debian dependencies. Sadly, not all tests currently pass. It seems there are some ordering dependencies between the tests in regards to how data are loaded. Fixing this probably would probably be better debugged by ensuring the test suite does not fail when using pytest random-order plugin.
debian/tests/control
debian/tests/unittest
--- a/debian/tests/control	Wed Jun 19 18:45:10 2019 +0200
+++ b/debian/tests/control	Tue Jul 09 11:13:08 2019 +0200
@@ -1,9 +1,9 @@
 Tests: unittest
 Depends:
- python3-cubicweb,
+ python3-cubicweb, cubicweb-ctl,
  @builddeps@,
  python3-pytest,
- python3-crypto, python3-psycopg2,
- postgresql, postgresql-plpython,
- firefox
+ python3-flake8,
+ python3-psycopg2, postgresql, postgresql-plpython,
+ python3-ldap3, slapd, ldap-utils
 Restrictions: allow-stderr, isolation-container
--- a/debian/tests/unittest	Wed Jun 19 18:45:10 2019 +0200
+++ b/debian/tests/unittest	Tue Jul 09 11:13:08 2019 +0200
@@ -8,6 +8,7 @@
 find cubicweb -type d -name 'test' -a '!' -wholename 'cubicweb/skeleton/*' | while read dir; do
 	mkdir -p "$AUTOPKGTEST_TMP"/$(dirname "$dir")
 	cp -r "$dir" "$AUTOPKGTEST_TMP/$dir"
+	cp tox.ini "$AUTOPKGTEST_TMP"
 done
 chown -R nobody:nogroup "$AUTOPKGTEST_TMP"