File: unit-test

package info (click to toggle)
libconfuse 3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,192 kB
  • sloc: ansic: 5,532; lex: 451; xml: 439; makefile: 213; sh: 39
file content (22 lines) | stat: -rwxr-xr-x 490 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

t="$(basename $0 | sed -e 's/-/_/g')"

cat > $AUTOPKGTEST_TMP/config.h << EOF
#define HAVE_SETENV 1
#define HAVE_UNSETENV 1
EOF

CFLAGS="-O2 -Wall $(pkg-config --cflags libconfuse) -I$AUTOPKGTEST_TMP -DSRC_DIR=\".\""
LDFLAGS=$(pkg-config --libs libconfuse)

cd tests
cc $CFLAGS -o $AUTOPKGTEST_TMP/$t.o -c $t.c 2>&1
cc -o $AUTOPKGTEST_TMP/$t $AUTOPKGTEST_TMP/$t.o $LDFLAGS 2>&1
echo "build: $t: OK"

[ -x $AUTOPKGTEST_TMP/$t ]
$AUTOPKGTEST_TMP/$t 2>&1
echo "run: $t: OK"