File: test-1

package info (click to toggle)
libwn6 6.0-12
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,004 kB
  • ctags: 3,903
  • sloc: ansic: 45,078; makefile: 958; csh: 274; sh: 26
file content (41 lines) | stat: -rw-r--r-- 994 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
#
# This is a simple script that tests libwn-dev
#
# install as: /usr/lib/debian-test/tests/libwn-dev
# or else as: /usr/lib/debian-test/tests/libwn-dev/test-1
# In the latter case, /usr/lib/debian-test/tests/libwn-dev/ can contain
# other file with test data and/or other scripts named test-2, test-3, etc.
#
# You can run this script with the command
#       sh debian/tests
# After installation, you can run it with the commands
#       /usr/lib/debian-test/tests/libwn-dev
# or
#       debian-test -v libwn-dev
# see debian-test(1)

. ${DEBIANTEST_LIB:-/usr/lib/debian-test/lib}/functions.sh

TESTDIR=/usr/lib/debian-test/tests/libwn-dev


## we need a scratch directory in which to execute

TMP=/tmp/libwn-dev-test.$$
test -e $TMP && rm -rf $TMP
mkdir $TMP
cd $TMP
trap "rm -rf $TMP" EXIT

thetest(){

    gcc -o selftest $TESTDIR/$d-selftest.c -lwn -lm  &&  ./selftest

    return $?
}


for d in  btr cmp hash low mem; do		\
  runtest "test library section $d" thetest;	\
done