[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recursively test mfiles in a directory
From: |
John W. Eaton |
Subject: |
Re: Recursively test mfiles in a directory |
Date: |
Wed, 7 Apr 2010 16:28:24 -0400 |
On 7-Apr-2010, Jaroslav Hajek wrote:
| On Tue, Apr 6, 2010 at 7:42 PM, forkandwait <address@hidden> wrote:
| > forkandwait <forkandwait <at> gmail.com> writes:
| >
| >>
| >> I recently posted a hack the general list, which runs all the tests in a
given
| >> file directory,
| >
| > Given the lack of interest, I am not going to worry about this code anymore
and
| > just consider my own personal hack. If anyone wants whatever becomes the
| > current code, send me an email and I will gladly share.
| >
| > F
| >
|
| Since Octave packages normally have all m-files in a single directory,
| so I don't really see why I would need it.
| But it occured to me that you could use this idea to contribute a
| function that could do something similar to what glob or readdir do,
| but operating recursively on all subdirectories.
I checked in this change:
http://hg.savannah.gnu.org/hgweb/octave/rev/3b77db443cc0
With it, you can do something like
octave:45> runtests polynomial
Processing files in /home/jwe/src/octave/scripts/polynomial:
compan.m ............................................... PASS 6/6
conv.m ................................................. PASS 6/6
deconv.m ............................................... PASS 7/7
mpoles.m ............................................... PASS 1/1
pchip.m ................................................ PASS 7/7
poly.m ................................................. PASS 4/4
polyaffine.m ........................................... PASS 1/1
polyderiv.m ............................................ PASS 4/4
polyfit.m .............................................. PASS 9/9
polyreduce.m ........................................... PASS 5/5
polyval.m .............................................. PASS 4/4
polyvalm.m ............................................. PASS 3/3
residue.m .............................................. PASS 4/4
roots.m ................................................ PASS 9/9
spline.m ............................................... PASS 16/16
The following files in have no tests:
mkpp.m polygcd.m polyout.m ppint.m ppval.m
polyder.m polyint.m ppder.m ppjumps.m unmkpp.m
octave:46>
It seems useful to me for users to be able to run the tests for the
script files installed in a given directory. If this is not the
functionality that the OP had in mind, then please explain what it is
you are looking for. I don't really see a need for this to work
recursively, but maybe if runtests is executed with no arguments, it
should just run tests for each directory in the Octave path. I guess
I would consider a patch for that functionality if someone submitted
one.
jwe