Debian Codegraph @

debian/tests/lib25519-fulltest

raw symbols SCIP
1 #!/bin/sh
2
3 dir=`dirname "$0"`
4
5 cd "${AUTOPKGTEST_TMP}"
6
7 cleanup() {
8 ex=$?
9 rm -rf lib25519build rsync.log build.log
10 exit "${ex}"
11 }
12 trap "cleanup" EXIT TERM INT
13
14 # test if valgrind package exists
15 echo 'test if valgrind package exists ... START'
16 if which valgrind >/dev/null; then
17 echo 'test if valgrind package exists ... OK'
18 else
19 echo 'test if valgrind package exists ... FAILED, skipping tests'
20 exit 77
21 fi
22
23 # copy source directory to lib25519build/
24 echo 'copying source directory to lib25519build/ ... START'
25 if rsync -a --exclude=debian "${dir}/../../" "lib25519build/" >rsync.log 2>&1; then
26 echo 'copying source directory to lib25519build/ ... OK'
27 else
28 cat rsync.log
29 echo 'copying source directory to lib25519build/ ... FAILED'
30 exit 1
31 fi
32
33 # build lib25519-fulltest
34 echo 'build lib25519-fulltest ... START'
35 (
36 cd lib25519build || exit 1
37 ./configure || exit 1
38 make || exit 1
39 ) > build.log 2>&1
40
41 ex=$?
42 if [ "${ex}" -eq 0 ]; then
43 echo 'build lib25519-fulltest ... OK'
44 else
45 cat build.log
46 echo 'build lib25519-fulltest ... FAILED'
47 fi
48
49 # run lib25519-fulltest
50 echo 'run lib25519-fulltest ... START'
51 env PATH="${PATH}:./lib25519build/build/0/package/bin" lib25519-fulltest
52
53 ex=$?
54 if [ "${ex}" -eq 0 ]; then
55 echo 'run lib25519-fulltest ... OK'
56 else
57 echo 'run lib25519-fulltest ... FAILED'
58 fi