[minpack] 07/08: Add autopkgtest, using provided examples.

Sébastien Villemot sebastien at debian.org
Fri Nov 24 21:43:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

sebastien pushed a commit to branch master
in repository minpack.

commit 531f18778564435897b516c852e275619e95ed0f
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Fri Nov 24 22:39:08 2017 +0100

    Add autopkgtest, using provided examples.
---
 debian/tests/control  |  3 +++
 debian/tests/examples | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..6f2ab41
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: examples
+Depends: minpack-dev, gfortran
+Restrictions: allow-stderr
diff --git a/debian/tests/examples b/debian/tests/examples
new file mode 100755
index 0000000..86a1c39
--- /dev/null
+++ b/debian/tests/examples
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+set -e
+
+# See the filelist in ex/index.html
+# We only test double-precision routines, since single-precision are not compiled in
+cp ex/file14 $AUTOPKGTEST_TMP/dmchar-test.f
+cp ex/file15 $AUTOPKGTEST_TMP/hybrd-test.f
+cp ex/file16 $AUTOPKGTEST_TMP/hybrj-test.f
+cp ex/file17 $AUTOPKGTEST_TMP/lmder-test.f
+cp ex/file18 $AUTOPKGTEST_TMP/lmstr-test.f
+cp ex/file19 $AUTOPKGTEST_TMP/lmdif-test.f
+cp ex/file20 $AUTOPKGTEST_TMP/chkder-test.f
+
+cp ex/file21 $AUTOPKGTEST_TMP/hybrd-hybrj.dat
+cp ex/file22 $AUTOPKGTEST_TMP/lmder-lmstr-lmdif.dat
+cp ex/file23 $AUTOPKGTEST_TMP/chkder.dat
+
+cd $AUTOPKGTEST_TMP
+
+for fsrc in *.f; do
+    gfortran $fsrc -o ${fsrc%.f} -lminpack
+done
+
+echo "*** TESTING: DMCHAR"
+./dmchar-test
+echo
+echo "*** TESTING: HYBRD"
+./hybrd-test < hybrd-hybrj.dat
+echo
+echo "*** TESTING: HYBRJ"
+./hybrj-test < hybrd-hybrj.dat
+echo
+echo "*** TESTING: LMDER"
+./lmder-test < lmder-lmstr-lmdif.dat
+echo
+echo "*** TESTING: LMSTR"
+./lmstr-test < lmder-lmstr-lmdif.dat
+echo
+echo "*** TESTING: LMDIF"
+./lmdif-test < lmder-lmstr-lmdif.dat
+echo
+echo "*** TESTING: CHKDER"
+./chkder-test < chkder.dat
+
+exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/minpack.git



More information about the debian-science-commits mailing list