bugGNU Octave - Bugs: bug #44303, resolve duplication / merge...


bug #44303: resolve duplication / merge runtests and __run_test_suite__

Submitter:  Mike Miller <mtmiller>
Submitted:  Thu 19 Feb 2015 05:13:06 AM UTC
Category:  Octave Function Severity:  2 - Minor
Priority:  3 - Low Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sun 05 Jan 2020 12:04:14 AM UTC, comment #5: 

In the meantime, I'm now using the "runtests2" function from the testify package (https://github.com/apjanke/octave-testify) as a better alternative that combines the features of "runtests" and "__run_test_suite__" that I want. That function resolves this bug report for me, except it's not part of Octave. Maybe that's ok, maybe we can outsource a more user-friendly set of test functions to a package, and just leave the maintenance of basic functions needed to run Octave's own tests in Octave itself.

Mike Miller <mtmiller>
Group Member
Fri 20 Feb 2015 01:04:06 AM UTC, comment #4: 

Re: Comment #2. In my second start-up, back when I was in my 20's and perhaps less politic than I am now, I got the nickname of the "bulldozer".  Mostly in a good way because I just rolled over whatever obstacles there were.  Octave is meant to be a fun coding project so don't let me stop you enjoying this bug report.  I mostly figure that no one else wants the job of being release manager and herding all of the cats.

Rik <rik5>
Group administrator
Thu 19 Feb 2015 09:44:12 PM UTC, comment #3: 

My main purpose is to have a documented callable function that users should be using to run test code in a given directory or in the entire load path. And ideally, the way tests are run and the output to the screen would be the same as `make check`.

People testing mxe-octave seem to have picked up on using _run_test_suite_, but it has no help, no options, always creates the same log file, several problems as a result of it really being meant for internal consumption only. But it is used more, so it does have more and better features than runtests (e.g. operating on *-tst files).

Don't let this hold up the release though :)

Mike Miller <mtmiller>
Group Member
Thu 19 Feb 2015 06:05:22 PM UTC, comment #2: 


Yeah, but this is the kind of distracting challenge that I like, so maybe I will waste some time on it...  :-)

John W. Eaton <jwe>
Group administrator
Thu 19 Feb 2015 05:39:58 PM UTC, comment #1: 

This is explained by parallel evolution.  runtests() evolved with rundemos() as a convenient way to check everything in a directory.

_run_test_suite_ evolved out of 'make check', in particular how to get the equivalent of 'make check' on an installed Windows system.

It may be harder than it looks to merge the two together since they were built differently.

Rik <rik5>
Group administrator
Thu 19 Feb 2015 05:13:06 AM UTC, original submission:  

There is a lot of duplicated functionality between the runtests.m and _run_test_suite_.m function files. Both functions have equivalent code to find files with unit tests, recurse into subdirectories, and display test results in a formatted output to the screen.

The _run_test_suite_ function primarily exists to support the fntests.m script used by `make check`. But it can also be used to run the full test suite on an installed copy of Octave. It also creates the fntests.log file.

The runtests function is more useful for testing functions in packages or in arbitrary directories on the load path. The output is slightly different from _run_test_suite_, and no log file is written.

It would be preferable to merge these functions or at least factor out as much common code as possible.

Mike Miller <mtmiller>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-15 siko1056 Dependencies- bugs #56325 is dependent
    2018-08-14 rik5 Priority5 - Normal 3 - Low

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code