[Pkg-octave-devel] First try on autopkgtest for OF packages

Sébastien Villemot sebastien at debian.org
Sat Aug 26 20:14:48 UTC 2017


On Sat, Aug 26, 2017 at 10:01:00PM +0200, Sébastien Villemot wrote:
> On Fri, Aug 25, 2017 at 09:14:44PM +0200, Rafael Laboissière wrote:
> > I have designed a very simple way of adding autopkgtest functionality to the
> > OF packages.  You can try it with the following commands:
> > 
> >    sudo aptitude install octave-image
> >    gbp clone https://anonscm.debian.org/git/pkg-octave/octave-image.git
> >    cd octave-image
> >    git checkout autopkgtest
> >    autopkgtest -B . -- null
> > 
> > Notice that you will need octave-pkg-dev >= 1.4.6 (now in unstable) for that
> > to work.
> > 
> > This is implemented through the d/tests/control file:
> > 
> > #####################################
> > Tests: unit-tests
> > Depends: @, octave-pkg-dev (>= 1.4.6)
> > #####################################
> > 
> > and the d/tests/unit-tests file:
> > 
> > #####################################
> > #!/bin/sh
> > exec 2>&1
> > set -e
> > debian/rules check-pkg
> > #####################################
> > 
> > Tell me what you think, please.
> 
> I did not yet give a try to it, so I may have missed something, but are you
> sure that it catches test failures? When the unit tests are run at build time,
> failures are never fatal (we have to look at the build log to catch them), and
> my understanding is that the autopkgtest relies on the same codebase. If we
> want the autopkgtest to be useful, it should actually catch test failures
> through the appropriate exit code.

I think there is another issue: the testing code creates temporary files in the
current directory. But this is not allowed
(/usr/share/doc/autopkgtest/README.package-tests.rst.gz says that there may be
no write access to the directory of the source tree).

My final concern is about the *.m files that are actually tested. If the source
tree has not been built, then the test routines rightly test the files under
/usr/share/octave. But if the source tree is built, then it tests files under
debian/ (see the addpath in check-pkg). It is not clear to me whether
autopkgtest may execute or not in a built tree, but this needs to be checked.

Thanks for working on this,

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  http://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-octave-devel/attachments/20170826/3eb1e829/attachment.sig>


More information about the Pkg-octave-devel mailing list