summaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/control12
-rwxr-xr-xdebian/tests/unit14
2 files changed, 26 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..7f67c1d
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,12 @@
+Test-Command: set -e ; cd "$AUTOPKGTEST_TMP" ; python3 -c "import orcus; print(orcus)"
+Depends:
+ python3,
+ python3-orcus,
+
+Tests: unit
+Depends:
+ liborcus-0.18-0,
+ liborcus-spreadsheet-model-0.18-0,
+ python3-orcus,
+ @builddeps@,
+Restrictions: build-needed, rw-build-tree
diff --git a/debian/tests/unit b/debian/tests/unit
new file mode 100755
index 0000000..3f38d0b
--- /dev/null
+++ b/debian/tests/unit
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# remove locally built liborcus so that we actually test the system one
+versions="$(dpkg --no-pager -l 'liborcus-*'|awk '/^ii/ {} /liborcus-[0-9]/ {print $2}'|cut -d: -f1|cut -d- -f2)"
+for v in $versions; do
+ echo deleting the following files:
+ find . -name "*${v}.so*"
+ find . -name "*${v}.so*" -delete
+done
+if [ -d ./src/python/.libs ]; then
+ rm -rfv ./src/python/.libs
+fi
+
+make check