[Pkg-octave-devel] [lenny octave-ga package] please upgrade to svn >= 20080816

Thomas Weber thomas.weber.mail at gmail.com
Thu Aug 21 11:54:20 UTC 2008


Am Donnerstag, den 21.08.2008, 13:25 +0200 schrieb Luca Favatella:
> 2008/8/21 Thomas Weber <thomas.weber.mail at gmail.com>:
> Can you please tell me how did you test all a package?
> Do you select manually the functions to test?

No, we have a script that does that (it's part of a Makefile):

==================================================================
check-pkg:
        -[ -e PKG_ADD ] && mv PKG_ADD PKG_ADD.bak

        @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 ;					\
        @OCTAVE@ $(octave_options) $$tmp ;			\
        rm -f $$tmp

        @if [ -f debian/check.m ] ; then			\
                @OCTAVE@ $(octave_options) --eval		\
                        "addpath (genpath ([pwd(),'/debian']));	\
                         source ('debian/check.m');" ;		\
        fi

        -[ -e PKG_ADD.bak ] && mv PKG_ADD.bak PKG_ADD
else
check-pkg:
endif
==================================================================

It moves PKG_ADD files aside and searches all .m files for assert and
test lines. These lines are then added to a temporary file ($$tmp) and
that file is sourced by Octave. 

The debian/check.m file is for adding specific tests, like demos that
can be run non-interactively (not all demos seem to work
non-interactively). But I haven't touched one of these check.m files
myself yet.

	Thomas






More information about the Pkg-octave-devel mailing list