File: run-unit-test

package info (click to toggle)
swarp 2.41.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,976 kB
  • sloc: ansic: 20,499; sh: 1,074; makefile: 78
file content (31 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
set -e

CUR_DIR=`pwd`

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 -a ${CUR_DIR}/"test"/*.fits $AUTOPKGTEST_TMP

cd $AUTOPKGTEST_TMP
gunzip -r *

echo "Test 1 - Default config file"
SWarp --dump > default.cfg
[ -s default.cfg ] || exit 1
rm -f ./default.cfg
echo "================================="
echo "PASS"

echo "Test 2 - Trying on a FITS data file"
SWarp test.fits 1> test2 2> test2
fgrep -q "done" test2
[ -s coadd.fits ] || exit 1
[ -s coadd.weight.fits ] || exit 1
[ -s swarp.xml ] || exit 1
rm -f ./coadd* ./swarp.xml ./test2
echo "=================================="
echo "PASS"