runtests - keep, rename, or delete?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

runtests - keep, rename, or delete?

Mike Miller-4
Hi all,

We may need to replace the function currently named `runtests` with a
completely different Matlab compatible function, which would break all
existing uses of `runtests`. How should we approach this?

Background:

A recent bug report [1] asks for a Matlab compatible `runtests`
function, presumably to provide a calling interface and to run unit
tests that are written in Matlab's test format.

As you may know, Octave already has its own `runtests` function, which
runs all Octave style unit tests in a directory. For example, several
Octave Forge packages use `runtests` in the maintainer makefile to run
unit tests.

Assuming the request is reasonable, these two uses of the same name are
incompatible, so we would probably want to retire the Octave `runtests`
function, or at least kill its name, sooner rather than later.

Separately, Andrew Janke has been working hard on a Testify package [2]
for Octave that seeks to improve on Octave's unit testing framework. The
`runtests` replacement offered in Testify is already a significant
improvement over Octave.

Questions for discussion:

Does Octave need to provide a Matlab compatible `runtests` function?
What other work would this new function require? Respond with EWONTFIX
and move on?

Whether that is done or not, should we avoid the name `runtests` in
Octave anyway to head off any potential future confusion? Or to allow a
package to attempt to implement it without shadowing problems?

If we do want to include this function, maybe not now but someday,
should we do anything in the near term for Octave 6?

At the moment, my preference would be to deprecate the `runtests`
function we have now in Octave 6, and point users to the Testify package
for improved replacement test functions.

Is there a compelling reason to keep `runtests` in Octave, possibly
under a new name?

Any thoughts?

[1]: https://savannah.gnu.org/bugs/?56325
[2]: https://github.com/apjanke/octave-testify

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: runtests - keep, rename, or delete?

Juan Pablo Carbajal-2
> A recent bug report [1] asks for a Matlab compatible `runtests`
> function, presumably to provide a calling interface and to run unit
> tests that are written in Matlab's test format.

Being partly author of that report I feel I should strengthen the
reasons for it ("feature request" sounds like "caprice" to me).
With a Matlab compatible `runtests` we will ease the porting of user
created Matlab packages into Octave. This will also speed up the
detection of compatibility issues between ML and Octave.
I know this considerable work, hence I am with Mike on this: mark
`runtests` as missing function, and deprecate the current homonymous
function in Octave.