override_dh_dwz:
@echo bypass dwz that causes build failures
endif
+
+override_dh_auto_test:
+ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+ LOCAL=true debian/tests/run-tests
+endif
--- /dev/null
+#!/bin/sh
+
+set -e
+
+LOCAL=${LOCAL:-false}
+CWD=$(pwd)
+BUILDDIR=obj-$(dpkg-architecture -qDEB_BUILD_MULTIARCH)
+
+if [ $LOCAL = true ] ; then
+ cd $BUILDDIR/examples
+ make
+ export PYTHONPATH=$CWD/$BUILDDIR/lang/
+ export LD_LIBRARY_PATH=$CWD/$BUILDDIR/src/
+else
+ cd examples
+ g++ wnd_samples.cpp full_test.cpp samples.cpp -o mgl_example -lmgl
+fi
+
+check_png() {
+ FILE=$1.png
+ echo -n "$FILE: "
+ file --brief $FILE | grep -q "^PNG image data,"
+ echo ok
+ rm -f $FILE
+}
+
+NAMES="$(./mgl_example)"
+rm -f mgl_example
+
+for i in $NAMES ; do
+ check_png $i
+done
+
+cd $CWD
+python3 examples/test.py
+check_png sample