|
From: | Julien Bect |
Subject: | Re: OF: proposal for reviewing packages |
Date: | Tue, 31 Jan 2017 19:06:31 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Le 31/01/2017 à 14:28, c. a écrit :
On 31 Jan 2017, at 14:11, Nicholas Jankowski <address@hidden> wrote:On Jan 31, 2017 7:14 AM, "Julien Bect" <address@hidden> wrote: Le 29/01/2017 à 22:13, Marco Atzeri a écrit : d) run the unit tests, e) report errors, warnings or comments on the tracker (along with any relevant piece of information: platform, version of Octave, version of dependencies, etc.). Neophyte question: is there a way to just run tests associated with a package,No, there isn't.
Yes, you *can* use __run_test_suite__ to run the tests of a specific package. For instance:
pkg load stk __run_test_suite__ ({'/home/bect/octave/stk-2.3.4'}, {})runs all the test for stk 2.3.4 (assuming that it is installed in /home/bect/octave/stk-2.3.4, of course).
or after installation would you just run __run_test_suite__ for the full installation?No, that won't work for packages that contain compiled functions.
It is true that the above solution *might* not work for packages that contain compiled functions.
In the above example (stk), the tests associated to mex-files are actually located in associated m-files, so they are run by __stk_run_test_suite__.
In the case of oct-files with unit test located inside the source files, indeed they are not run.
There is a project being proposed for GSoC about improving pkg.m, I do think that this would be one important feature to add.
You should look at the following bug reports first: https://savannah.gnu.org/bugs/?41298 https://savannah.gnu.org/bugs/?41215The patch proposed by Lachlan for #41298 modifies "pkg install" and test to extract/run the tests located in oct-files.
The patch proposed by Oliver for #41215 makes it easier to run all the tests using a new "pkg test" command.
These patches have been waiting for more than one year for someone to review them ;-)
@++ Julien
[Prev in Thread] | Current Thread | [Next in Thread] |