Debian Codegraph @

debian/tests/run-tests

raw
1 #!/bin/sh
2
3 set -e
4
5 LOCAL=${LOCAL:-false}
6 CWD=$(pwd)
7 BUILDDIR=obj-$(dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8
9 if [ $LOCAL = true ] ; then
10 cd $BUILDDIR/examples
11 make
12 export PYTHONPATH=$CWD/$BUILDDIR/lang/
13 export LD_LIBRARY_PATH=$CWD/$BUILDDIR/src/
14 else
15 cd examples
16 g++ wnd_samples.cpp full_test.cpp samples.cpp -o mgl_example -lmgl
17 fi
18
19 check_png() {
20 FILE=$1.png
21 echo -n "$FILE: "
22 file --brief $FILE | grep -q "^PNG image data,"
23 echo ok
24 rm -f $FILE
25 }
26
27 NAMES="$(./mgl_example)"
28 rm -f mgl_example
29
30 for i in $NAMES ; do
31 check_png $i
32 done
33
34 cd $CWD
35 for py in $(py3versions -d 2> /dev/null)
36 do
37 ${py} examples/test.py
38 done
39 check_png sample