[Scons-dev] Buildbot, Java and D...

Dirk Bächle tshortik at gmx.de
Sat Sep 13 04:06:25 EDT 2014


Hi William,

On 13.09.2014 00:59, William Blevins wrote:
>
>     # No result if tools not available
>     test.no_result( condition=(test.where_is( 'javac' ) is None) )
>     test.no_result( condition=(test.where_is( 'jar' ) is None) )
>     # This test is known to fail as of July 2014; see Tigris issue
>     1771 and issue 2931.
>     # Once the underlying issue is corrected, this test should be
>     re-enabled.
>     test.skip_test('Skipping derived-source test until issue 1771 is
>     fixed.\n')
>
>
> Based on the above code snippet, I don't understand how that is 
> possible.  If Java is not installed, then the test should be a "no 
> result".
>

and here is what the documentation of TestCmd.no_result() says about this:

def no_result(self = None, condition = 1, function = None, skip = 0):
     """Causes a test to exit with no valid result.

     By default, the no_result() method reports NO RESULT for the test
     and exits with a status of 2.  If a condition argument is supplied,
     the test fails only if the condition is true.
     """

The point here is that the no_result() method stops the current test 
immediately with a sys.exit(2)...so in the case where one of "javac/jar" 
can't be found, the skip_test() isn't reached.
That's where the exit code of "2" comes from, I guess.

For an immediate fix, I'd like to suggest simply moving the skip_test() 
line above the no_result()s. Does that sound reasonable?

Regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20140913/78c7b0c3/attachment.html>


More information about the Scons-dev mailing list