Debian Codegraph @

debian/tests/compile-libsdl-gfx-test0

raw
1 #!/bin/sh
2
3 # Author: Manuel A. Fernandez Montecelo <[email protected]>
4 #
5 # autopkgtest check: Build example programs against the library, to perform a
6 # basic smoke test
7
8
9 set -e
10
11 WORKDIR=$(mktemp -d)
12 trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
13 cd $WORKDIR
14
15 EXAMPLES=/usr/share/doc/libsdl-gfx1.2-doc/examples.tar.gz
16
17 # compile
18 tar xvf $EXAMPLES -C .
19 cd examples
20 ./autogen.sh
21 ./configure --host=$DEB_HOST_GNU_TYPE
22
23 make
24 echo "build: OK"
25
26 # check/execute
27 for BINFILE in `echo Test*.c | sed 's|\.c||g'`
28 do
29 echo "check if test executable does exist: $BINFILE"
30 [ -x "$BINFILE" ]
31
32 # interactive, cannot invoke and close from command line
33 #./$BINFILE
34 done
35 echo "run: OK"