File: installation-test

package info (click to toggle)
profbval 1.0.22-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 632 kB
  • sloc: perl: 720; sh: 610; makefile: 37; fortran: 7
file content (28 lines) | stat: -rw-r--r-- 849 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
#!/bin/sh
# autopkgtest check: build and run with default test data
# Author: Tatiana Malygina <merlettaia@gmail.com>

set -e

pkg=profbval

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cd $AUTOPKGTEST_TMP

cp -a /usr/share/doc/${pkg}/examples/* .
find . -type f -name "*.gz" -exec gunzip \{\} \;
for lnk in `find . -type l -name "*.gz"` ; do
    ln -s `basename $(readlink $lnk) .gz` `echo $lnk | sed 's/\.gz$//'`
    rm $lnk
done

# call example from man:
profbval cad23.f cad23-fil.rdbProf cad23-fil.hssp result.profbval 9 6
[ -s result.profbval ]
#there is also gzipped output from package's authors, we can compare result 
#from profbval call with that sample output - it must be the same
cmp --silent result.profbval cad23.profbval