[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41215] Request for a "pkg test" feature

From: Mike Miller
Subject: [Octave-bug-tracker] [bug #41215] Request for a "pkg test" feature
Date: Sat, 4 Jan 2020 18:40:49 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36

Follow-up Comment #32, bug #41215 (project octave):

Yeah, I was already planning on filing a bug report to use a new better test
function than "__run_test_suite__" in "pkg test" once this is complete.

Here's the thing, __run_test_suite__ is a private function and is very
specific to Octave's own test suite. It has internal assumptions about the
directory structure, about the log file name, about the existence of inline
tests vs standalone test scripts.

But it does have some useful features like directory tree recursion, test
errors to a log file, returned test status, that no other built in test
functions have.

What we need is a new **public** function to run _any_ test suite, not just
Octave's test suite, with these same features. Recurse into directory
structures. Output the test status with long root directories elided. Send
test errors to an optional log file with the name chosen by the caller. Return
the number of tests passed and failed.

See bug #44303.

For now, Octave has no suitable alternative to __run_test_suite__, so you
might as well use it. I don't think you should change the directory or add any
other hacks to work around the fntests.log file name.

If you're interested, I use runtests2 from the testify package
(https://github.com/apjanke/octave-testify) to run test suites in my packages.
Obviously external for now, so that doesn't help here. This function
implements most of these features.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]