[Debian-astro-commits] [wcslib] 01/01: Add CI tests
Ole Streicher
olebole at moszumanska.debian.org
Mon Jun 20 20:54:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch debian
in repository wcslib.
commit 5d5b9609e9755dc7fa875112fb9db50ebf9f7e8d
Author: Ole Streicher <olebole at debian.org>
Date: Mon Jun 20 22:36:25 2016 +0200
Add CI tests
---
debian/changelog | 1 +
debian/tests/control | 7 +++++++
debian/tests/wcslib_test_C | 39 +++++++++++++++++++++++++++++++++++++++
debian/tests/wcslib_test_Fortran | 25 +++++++++++++++++++++++++
4 files changed, 72 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 057b438..93c2477 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ wcslib (5.15-2) UNRELEASED; urgency=low
* Use dynamic linking for wcslib-tools instead of static
* Move libpgsbox and wcsgrid from contrib
+ * Add CI tests
-- Ole Streicher <olebole at debian.org> Sat, 18 Jun 2016 15:16:41 +0200
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..2bfa0ca
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,7 @@
+Test: wcslib_test_C
+Depends: wcslib-dev, wcslib-tools, libcfitsio-dev, gcc, libc6-dev
+Restrictions: allow-stderr
+
+Test: wcslib_test_Fortran
+Depends: wcslib-dev, wcslib-tools, gfortran, gcc, libc6-dev
+Restrictions: allow-stderr
diff --git a/debian/tests/wcslib_test_C b/debian/tests/wcslib_test_C
new file mode 100755
index 0000000..b5212b4
--- /dev/null
+++ b/debian/tests/wcslib_test_C
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cp C/test/* $ADTTMP
+cd $ADTTMP
+
+# 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
diff --git a/debian/tests/wcslib_test_Fortran b/debian/tests/wcslib_test_Fortran
new file mode 100755
index 0000000..eac05e3
--- /dev/null
+++ b/debian/tests/wcslib_test_Fortran
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+cp Fortran/test/* C/test/tofits.c C/test/*.keyrec $ADTTMP/
+cd $ADTTMP/
+
+# 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 twcs twcssub tpih1 \
+ tfitshdr twcsfix"
+
+# Run test that need compiling programs
+for t in $TESTS ; do
+ gfortran -O2 -I. -I/usr/include/wcslib -o $t $t.f -lwcs -lm
+ echo +++++ Test: $t +++++
+ ./$t
+done
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/wcslib.git
More information about the Debian-astro-commits
mailing list