octave-maintainers
[Top][All Lists]
Advanced

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

Re: Failing Java tests due to no JRE


From: Rik
Subject: Re: Failing Java tests due to no JRE
Date: Thu, 15 Sep 2016 14:03:11 -0700

On 09/15/2016 11:52 AM, John W. Eaton wrote:
> On 09/15/2016 01:29 PM, Rik wrote:
>> On 09/15/2016 08:12 AM, Mike Miller wrote:
>>> On Wed, Sep 14, 2016 at 14:59:59 -0700, Rik wrote:
>>>> I'm testing the 4.2.0-rc1 candidate on a Windows XP virtual machine which
>>>> does not have Java installed.  When using __run_test_suite__ all of the
>>>> Java tests fail (Duh!).  The issue is that all of the tests begin with
>>>>
>>>> %!testif HAVE_JAVA
>>>>
>>>> Certainly, when Octave was cross-compiled with MXE Java was available,
>>>> but
>>>> now at runtime there is no Java environment.  Should all of these tests
>>>> begin with
>>>>
>>>> %!testif HAVE_JAVA
>>>> %! if (! usejava ("jvm"))
>>>> %!   return;
>>>>
>>>> so that if no JVM is available at run time they are not executed?
>>> Yes I think that's a good idea. It's also possible to run Octave on any
>>> GNU or Unix system with no JRE installed and the same test failure would
>>> happen there.
>>>
>>
>> Done.  See cset http://hg.savannah.gnu.org/hgweb/octave/rev/a3f74fed899b.
>
> That seems OK as a way to avoid failures but doesn't it also cause the
> test to succeed since the test will return early with no error? Shouldn't
> it report "skipped" instead?  If so, I think we'll need to enhance the
> way the condition in a testif block works.  But that is definitely not
> urgent, so can wait until after the release.
>

You could introduce some in-band communication method.  Right now I believe
test.m takes the test code, wraps it in a function, evals the function into
existence, and then executes the new function in a try/catch block.  I
don't believe the created function has a return argument, but you could
bolt one on and use that to pass information back to test.m.  And certainly
there is no rush to do this.

On the other hand, I'm not sure its worth doing.  If you are interested in
using Java then you will have a JRE installed.  If you aren't interested in
using Java, then do you really care which bin (skipped or success) the
tests are counted against?  Most people care only about the failures.

--Rik



reply via email to

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