[Pkg-octave-commit] r1420 - in octave-pkg-dev/trunk: . debian
Rafael Laboissiere
rafael at alioth.debian.org
Thu Mar 20 09:13:40 UTC 2008
Author: rafael
Date: 2008-03-20 09:13:40 +0000 (Thu, 20 Mar 2008)
New Revision: 1420
Modified:
octave-pkg-dev/trunk/README
octave-pkg-dev/trunk/debian/changelog
octave-pkg-dev/trunk/octave-pkg-dev.mk.in
Log:
Run unit tests automatically
Modified: octave-pkg-dev/trunk/README
===================================================================
--- octave-pkg-dev/trunk/README 2008-03-19 23:50:42 UTC (rev 1419)
+++ octave-pkg-dev/trunk/README 2008-03-20 09:13:40 UTC (rev 1420)
@@ -5,7 +5,7 @@
for the Octave add-ons, which are built/installed through the pkg.m
system.
-To use this package, make your add-on source package build-depends on
+To use this package, make your add-on source package build-depend on
octave-pkg-dev and add the following line to debian/rules:
include /usr/share/octave/debian/octave-pkg-dev.mk
@@ -28,9 +28,15 @@
[1] http://octave.sourceforge.net/packages.html
The make-orig-tarball rule will build the .orig.tar.gz upstream
-tarball using the pkg taball downloaded by using get-orig-source.
+tarball using the pkg tarball downloaded through get-orig-source.
-In order to the scripts and scraps to work, it is necessary that the
-package is named "octave-something" in debian/control.
+In order to have octave-pkg-dev working properly, it is necessary that
+the binary package is named "octave-something" in debian/control.
- -- Rafael Laboissiere <rafael at debian.org>, Tue, 26 Feb 2008 01:11:04 +0100
+Automatic running of unit tests is provided. This is done by
+inspecting the .m files under the debian directory after the package
+is built and detecting those containing "%!test" and/or "%!assert"
+directives. Additional tests not contained in the upstream source
+files may be put in debian/check.m.
+
+ -- Rafael Laboissiere <rafael at debian.org>, Thu, 20 Mar 2008 09:00:07 +0100
Modified: octave-pkg-dev/trunk/debian/changelog
===================================================================
--- octave-pkg-dev/trunk/debian/changelog 2008-03-19 23:50:42 UTC (rev 1419)
+++ octave-pkg-dev/trunk/debian/changelog 2008-03-20 09:13:40 UTC (rev 1420)
@@ -1,9 +1,11 @@
-octave-pkg-dev (0.2.2) UNRELEASED; urgency=low
+octave-pkg-dev (0.3) UNRELEASED; urgency=low
[ Rafael Laboissiere ]
* octave-pkg-dev.mk.in:
+ Do not check dependencies when installing the package
+ Remove empty installation directories
+ + Run unit test automatically for .m files containing "%!test"
+ and/or "%!assert" directives
[ Thomas Weber ]
* debian/control: Vcs-fields point to the trunk/ directory
Modified: octave-pkg-dev/trunk/octave-pkg-dev.mk.in
===================================================================
--- octave-pkg-dev/trunk/octave-pkg-dev.mk.in 2008-03-19 23:50:42 UTC (rev 1419)
+++ octave-pkg-dev/trunk/octave-pkg-dev.mk.in 2008-03-20 09:13:40 UTC (rev 1420)
@@ -45,12 +45,25 @@
pkg -nodeps install $(filename)"
rm -f $(CURDIR)/$(debpkg)/$(mpath)/$(pkgname)/packinfo/COPYING
DH_AUTOSCRIPTDIR=$(shrpkg) $(shrpkg)/octave-pkg-dev.pl
+
+ echo Checking package...
+
+ @tmp=$$(tempfile) ; \
+ echo "addpath (genpath ([pwd(),'/debian']));" > $$tmp ; \
+ find debian/ -name \*.m \
+ | xargs grep -l '^%!\(assert\|test\)' \
+ | perl -pe 's:.*/(.*)\.m::; \
+ print "disp (\"[$$1]\")\ntest $$1"' \
+ >> $$tmp ; \
+ @PACKAGE@ -q --no-init-file $$tmp ; \
+ rm -f $$tmp
+
@if [ -f debian/check.m ] ; then \
- echo Checking package... ; \
@PACKAGE@ -q --no-init-file --eval \
"addpath (genpath ([pwd(),'/debian'])); \
source ('debian/check.m');" ; \
fi
+
rmdir --ignore-fail-on-non-empty -p \
$(CURDIR)/$(debpkg)/$(mpath) \
$(CURDIR)/$(debpkg)/$(bpath)
More information about the Pkg-octave-commit
mailing list