File: unit-test

package info (click to toggle)
confuse 3.2.2%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 2,840 kB
  • sloc: sh: 5,180; ansic: 4,584; lex: 440; xml: 439; makefile: 188; sed: 16
file content (22 lines) | stat: -rwxr-xr-x 490 bytes parent folder | download
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 $LDFLAGS -o $AUTOPKGTEST_TMP/$t $AUTOPKGTEST_TMP/$t.o 2>&1
echo "build: $t: OK"

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