[Pkg-octave-devel] Bug#672756: Bug#672756: octave-pkg-dev: testsuite does not handle files under inst/private

Rafael Laboissiere rafael at laboissiere.net
Wed May 30 07:09:16 UTC 2012


* Sébastien Villemot <sebastien.villemot at ens.fr> [2012-05-13 14:59]:

> When the testsuite of an Octave Forge package is run, the unit tests of files
> under inst/private are not run (instead one gets a non-fatal error message).
> 
> Example from octave-statistics, which contains a file called
> inst/private/tbl_delim.m:
> 
>  [tbl_delim]
>  ????? tbl_delim does not exist in path
> 
> The error message is harmless, but as a consequence the unit tests of
> tbl_delim.m are not run.

For the normal usage of Octave, having tests burried into private files
is a design mistake, since they cannot be exercised by the test()
function.  Of course, one can add the private directory to the path, but
this would defeat the very concept of a "private" directory.

We have two options here: 

(1) We change octave-pkg-dev such that it checks whether the .m file is
in a private directory and accordingly change the Octave path prior to
running the test.

(2) We inform the upstream author about the design mistake.  In the case
of tbl_delim.m in octave-statistics, in particular, the tests were kept
when the file moved from inst/__tbl_delim__.m into
inst/private/tbl_delim.m [*].  A rational thing to do would be to move
the tests from tbl_delim.m into tblwrite.m, the only place where
tbl_delim() is invoked.

Rafael

[*] http://octave.svn.sourceforge.net/viewvc/octave?view=revision&revision=8818





More information about the Pkg-octave-devel mailing list