File: wcslib-test-C

package info (click to toggle)
wcslib 7.4%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,752 kB
  • sloc: ansic: 32,656; lex: 9,281; fortran: 6,634; sh: 3,369; sed: 497; pascal: 188; makefile: 15
file content (39 lines) | stat: -rwxr-xr-x 893 bytes parent folder | download
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
32
33
34
35
36
37
38
39
#!/bin/sh

set -e

cp C/test/* $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP

# Create FITS files for tests
gcc -O2 -o tofits tofits.c
for f in *.keyrec; do
    fits=`echo $f | sed s/.keyrec/.fits/`
    ./tofits < $f > $fits
done

# wcslib related tests only
TESTS="tlin tdis1 tdis2 tlog tprj1 tsph tspx ttab1 twcssub \
       tpih1 tbth1 tfitshdr twcsfix twcscompare"

touch wcsconfig_tests.h # Just dummy

# Run test that need compiling programs
for t in $TESTS ; do
    gcc -O2 -I. -I/usr/include/wcslib -o $t $t.c -lwcs -lm
    echo +++++ Test: $t +++++
    ./$t
done

# Test with cfitsio
gcc -O2 -I/usr/include/wcslib -o twcstab twcstab.c -lwcs -lcfitsio -lm
echo +++++ Test: twcstab +++++
./twcstab

# Run tests with the user tool wcsware
sed s+../utils/wcsware+wcsware+ -i tdis3 twcslint
chmod 755 tdis3 twcslint
echo +++++ Test: tdis3 +++++
./tdis3
echo +++++ Test: twcsclient +++++
./twcslint