[xmds2] 01/03: Add support for autopkgtest

Rafael Laboissiere rafael at debian.org
Sat Oct 7 13:47:09 UTC 2017


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

rafael pushed a commit to branch master
in repository xmds2.

commit b9f7615e69093c6fbe02a723c08b09fa0e076501
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Sat Oct 7 04:02:19 2017 -0300

    Add support for autopkgtest
---
 debian/rules           | 21 +--------------------
 debian/tests/control   |  3 +++
 debian/tests/run-tests | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/debian/rules b/debian/rules
index b97d315..c4de35e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,6 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
-XMDS_USER_DATA = $(CURDIR)/debian/xmds-user-data
-
 #DH_VERBOSE=1
 
 %:
@@ -13,24 +11,7 @@ override_dh_auto_install:
 	python debian/fix-cheetah-build-str.py
 
 override_dh_auto_test:
-	( export PYTHONPATH=$$(pwd) ;			\
-	  export PATH=$$(pwd)/bin-test:$$PATH ;		\
-	  export XMDS_USER_DATA=$(XMDS_USER_DATA) ;	\
-	  unset CXXFLAGS ; export CXXFLAGS ; 		\
-          export OMPI_MCA_plm_rsh_agent=/bin/false ;	\
-	  mkdir bin-test ;				\
-	  install -m 755 bin/* bin-test ; 		\
-	  xmds2 --reconfigure ;				\
-	  ./run_tests.py -v ;				\
-	  cd ./examples ;				\
-	  xmds2 lorenz.xmds ;				\
-	  ./lorenz | grep '^\(Seg\|  Att\|Gen\)' ;	\
-	  xsil2graphics2 -m lorenz.xsil ;		\
-	  echo "source ('lorenz.m');			\
-		figure ('visible', 'off');		\
-		plot (t_1, xR_1);			\
-		disp ('Octave plot succeeded')"		\
-		| octave -qf )
+	debian/tests/run-tests -b
 
 override_dh_auto_clean:
 	dh_clean
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..664e465
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-tests
+Depends: xmds2, octave, gnuplot-nox
+Restrictions: allow-stderr
diff --git a/debian/tests/run-tests b/debian/tests/run-tests
new file mode 100755
index 0000000..56183d1
--- /dev/null
+++ b/debian/tests/run-tests
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+while getopts ":b" opt; do
+  case $opt in
+      b)
+         mkdir -p $(pwd)/bin-test
+	 install --mode=755 bin/* bin-test
+	 export PATH=$(pwd)/bin-test:$PATH
+	 export PYTHONPATH=$(pwd)
+         ;;
+  esac
+done
+
+export XMDS_USER_DATA=$(pwd)/debian/xmds-user-data
+unset CXXFLAGS ; export CXXFLAGS
+export OMPI_MCA_plm_rsh_agent=/bin/false
+
+export PATH=$(pwd)/bin-test:$PATH
+mkdir -p $(pwd)/bin-test
+
+xmds2 --reconfigure
+./run_tests.py -v
+cd ./examples
+xmds2 lorenz.xmds
+./lorenz | grep '^\(Seg\|  Att\|Gen\)'
+xsil2graphics2 -m lorenz.xsil
+echo "source ('lorenz.m');			\
+      figure ('visible', 'off');		\
+      plot (t_1, xR_1);				\
+      disp ('Octave plot succeeded')"		\
+      | octave -qf

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



More information about the debian-science-commits mailing list