#!/bin/sh dir=`dirname "$0"` cd "${AUTOPKGTEST_TMP}" cleanup() { ex=$? rm -rf lib25519build rsync.log build.log exit "${ex}" } trap "cleanup" EXIT TERM INT # test if valgrind package exists echo 'test if valgrind package exists ... START' if which valgrind >/dev/null; then echo 'test if valgrind package exists ... OK' else echo 'test if valgrind package exists ... FAILED, skipping tests' exit 77 fi # copy source directory to lib25519build/ echo 'copying source directory to lib25519build/ ... START' if rsync -a --exclude=debian "${dir}/../../" "lib25519build/" >rsync.log 2>&1; then echo 'copying source directory to lib25519build/ ... OK' else cat rsync.log echo 'copying source directory to lib25519build/ ... FAILED' exit 1 fi # build lib25519-fulltest echo 'build lib25519-fulltest ... START' ( cd lib25519build || exit 1 ./configure || exit 1 make || exit 1 ) > build.log 2>&1 ex=$? if [ "${ex}" -eq 0 ]; then echo 'build lib25519-fulltest ... OK' else cat build.log echo 'build lib25519-fulltest ... FAILED' fi # run lib25519-fulltest echo 'run lib25519-fulltest ... START' env PATH="${PATH}:./lib25519build/build/0/package/bin" lib25519-fulltest ex=$? if [ "${ex}" -eq 0 ]; then echo 'run lib25519-fulltest ... OK' else echo 'run lib25519-fulltest ... FAILED' fi