File: run-unit-test

package info (click to toggle)
stiff 2.4.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,384 kB
  • sloc: sh: 8,729; ansic: 7,862; makefile: 39
file content (28 lines) | stat: -rw-r--r-- 658 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/bash
set -e

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

cp /usr/lib/eso-midas/*/test/prim/image_M12c.fits $AUTOPKGTEST_TMP

cd $AUTOPKGTEST_TMP
gunzip -r *

echo "Test 1 - Default config file"
stiff -dd > default.cfg
[ -s default.cfg ] || exit 1
echo "================================="
echo "PASS"

echo "Test 2 - Trying on a FITS data file"
stiff image_M12c.fits 1> test2 2> test2
cat test2
ls
fgrep -q "done" test2
[ -s stiff.tif ] || exit 1
rm -f ./*.cfg ./*.tiff ./*.fits ./*.xml
echo "=================================="
echo "PASS"