You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2007/01/18 14:37:41 UTC

[classlib][portlib] Native tests

I've checked in an initial attempt at creating some native tests so that
we can test portlib without drlvm (or a VME).  I intended to add a few
more tests for other portlib functions soon.  Most of the "tests" don't
really do anything more than confirm that the function runs.  Hopefully
we can improve some of them.

The test output should appear in the normal "ant test" report under
a package "native.portlib".  The output from the tests is available
from the "System.out" link on the each tests results page.  This could
probably be improved.

In order to get the tests to run, the modules/portlib/build.xml sets
LD_LIBRARY_PATH on unix to enable libhyprt.so and friends to be found.
On windows I've tried to set the PATH but have suffered from some
issues with the interaction of the case-sensitive variables in ant
and case-insensitive variables in windows.  I've currently left an
'unless="is.windows"' in modules/portlib/ build.xml because of these
issues - and because when it fails it brings up a dialog box hanging any
automated builds.

I'd really, really appreciate any insight people might have in making
the execution of these tests reliable on windows.

Regards,
 Mark.




Re: [classlib][portlib] Native tests

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Jan 18, 2007, at 10:37 AM, Mark Hindess wrote:

>
> I've checked in an initial attempt at creating some native tests so  
> that
> we can test portlib without drlvm (or a VME).  I intended to add a few
> more tests for other portlib functions soon.  Most of the "tests"  
> don't
> really do anything more than confirm that the function runs.   
> Hopefully
> we can improve some of them.

Cool!

+1 !

>
> The test output should appear in the normal "ant test" report under
> a package "native.portlib".  The output from the tests is available
> from the "System.out" link on the each tests results page.  This could
> probably be improved.
>
> In order to get the tests to run, the modules/portlib/build.xml sets
> LD_LIBRARY_PATH on unix to enable libhyprt.so and friends to be found.
> On windows I've tried to set the PATH but have suffered from some
> issues with the interaction of the case-sensitive variables in ant
> and case-insensitive variables in windows.  I've currently left an
> 'unless="is.windows"' in modules/portlib/ build.xml because of these
> issues - and because when it fails it brings up a dialog box  
> hanging any
> automated builds.
>
> I'd really, really appreciate any insight people might have in making
> the execution of these tests reliable on windows.
>
> Regards,
>  Mark.
>
>
>


Re: [classlib][portlib] Native tests

Posted by Mark Hindess <ma...@googlemail.com>.
On 23 January 2007 at 11:49, Gregory Shimansky <gs...@gmail.com> wrote:
> Mark Hindess wrote:
> > I've checked in an initial attempt at creating some native tests so that
> > we can test portlib without drlvm (or a VME).  I intended to add a few
> > more tests for other portlib functions soon.  Most of the "tests" don't
> > really do anything more than confirm that the function runs.  Hopefully
> > we can improve some of them.
> > 
> > The test output should appear in the normal "ant test" report under
> > a package "native.portlib".  The output from the tests is available
> > from the "System.out" link on the each tests results page.  This could
> > probably be improved.
> > 
> > In order to get the tests to run, the modules/portlib/build.xml sets
> > LD_LIBRARY_PATH on unix to enable libhyprt.so and friends to be found.
> > On windows I've tried to set the PATH but have suffered from some
> > issues with the interaction of the case-sensitive variables in ant
> > and case-insensitive variables in windows.  I've currently left an
> > 'unless="is.windows"' in modules/portlib/ build.xml because of these
> > issues - and because when it fails it brings up a dialog box hanging any
> > automated builds.
> 
> There are C native tests in DRLVM which test the threading system API. 
> You can find the launching file in 
> drlvm/trunk/build/make/targets/cunit.test.xml [1].

Yes.  I'd seen these.  I was avoiding testing the threading API since
there is still a debate to be had about where it belongs.  (Actually,
I think there is debate over other code too.  For instance, the hysl.c
functions for shared libraries is probably duplicated too just not in
quite such an obvious way.)

Of course, using the threading API is unavoidable.  Even the
"simple" init test that just calls "hyport_init_library" and
"port_shutdown_library" requires the threading API.

When looking at porting on FreeBSD and other platforms, the "simple"
init test is the one that fails most often.

> It looks like on windows you should use "Path" environment variable
> and use ${env.Path} in Ant.

Okay.  Then, in theory, the existing ant code should work on windows.

-Mark.

> > I'd really, really appreciate any insight people might have in making
> > the execution of these tests reliable on windows.
> 
> [1] 
> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/
> cunit.test.xml?content-type=text%2Fplain&view=co
> 
> -- 
> Gregory
> 



Re: [classlib][portlib] Native tests

Posted by Gregory Shimansky <gs...@gmail.com>.
Mark Hindess wrote:
> I've checked in an initial attempt at creating some native tests so that
> we can test portlib without drlvm (or a VME).  I intended to add a few
> more tests for other portlib functions soon.  Most of the "tests" don't
> really do anything more than confirm that the function runs.  Hopefully
> we can improve some of them.
> 
> The test output should appear in the normal "ant test" report under
> a package "native.portlib".  The output from the tests is available
> from the "System.out" link on the each tests results page.  This could
> probably be improved.
> 
> In order to get the tests to run, the modules/portlib/build.xml sets
> LD_LIBRARY_PATH on unix to enable libhyprt.so and friends to be found.
> On windows I've tried to set the PATH but have suffered from some
> issues with the interaction of the case-sensitive variables in ant
> and case-insensitive variables in windows.  I've currently left an
> 'unless="is.windows"' in modules/portlib/ build.xml because of these
> issues - and because when it fails it brings up a dialog box hanging any
> automated builds.

There are C native tests in DRLVM which test the threading system API. 
You can find the launching file in 
drlvm/trunk/build/make/targets/cunit.test.xml [1]. It looks like on 
windows you should use "Path" environment variable and use ${env.Path} 
in Ant.

> I'd really, really appreciate any insight people might have in making
> the execution of these tests reliable on windows.

[1] 
http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml?content-type=text%2Fplain&view=co

-- 
Gregory


Re: [classlib][portlib] Native tests

Posted by Mark Hindess <ma...@googlemail.com>.
On 23 January 2007 at 15:22, "Spark Shen" <sm...@gmail.com> wrote:
>
> Hi Mark:
> I have long before thought about this. This is really a good idea.
> I'd like to write more native tests, And plans to start from file
> related functions (In case you have not write them).

Thanks.

Actually I already have a little code for functions in hyfile.c,
hysysinfo.c and something started for hysl.c.  I'll probably commit it
today.

Having said that these still need plenty of work and there are still
more function sets to cover.  So help is much appreciated.

-Mark.

> 2007/1/18, Mark Hindess <ma...@googlemail.com>:
> >
> >
> > I've checked in an initial attempt at creating some native tests so that
> > we can test portlib without drlvm (or a VME).  I intended to add a few
> > more tests for other portlib functions soon.  Most of the "tests" don't
> > really do anything more than confirm that the function runs.  Hopefully
> > we can improve some of them.
> >
> > The test output should appear in the normal "ant test" report under
> > a package "native.portlib".  The output from the tests is available
> > from the "System.out" link on the each tests results page.  This could
> > probably be improved.
> >
> > In order to get the tests to run, the modules/portlib/build.xml sets
> > LD_LIBRARY_PATH on unix to enable libhyprt.so and friends to be found.
> > On windows I've tried to set the PATH but have suffered from some
> > issues with the interaction of the case-sensitive variables in ant
> > and case-insensitive variables in windows.  I've currently left an
> > 'unless="is.windows"' in modules/portlib/ build.xml because of these
> > issues - and because when it fails it brings up a dialog box hanging any
> > automated builds.
> >
> > I'd really, really appreciate any insight people might have in making
> > the execution of these tests reliable on windows.
> >
> > Regards,
> > Mark.
> >
> >
> >
> >
> 
> 
> -- 
> Spark Shen
> China Software Development Lab, IBM
> 
> ------=_Part_160637_32271769.1169536922904--
> 



Re: [classlib][portlib] Native tests

Posted by Spark Shen <sm...@gmail.com>.
Hi Mark:
I have long before thought about this. This is really a good idea.
I'd like to write more native tests, And plans to start from file related
functions (In case you have not write them).

Best regards

2007/1/18, Mark Hindess <ma...@googlemail.com>:
>
>
> I've checked in an initial attempt at creating some native tests so that
> we can test portlib without drlvm (or a VME).  I intended to add a few
> more tests for other portlib functions soon.  Most of the "tests" don't
> really do anything more than confirm that the function runs.  Hopefully
> we can improve some of them.
>
> The test output should appear in the normal "ant test" report under
> a package "native.portlib".  The output from the tests is available
> from the "System.out" link on the each tests results page.  This could
> probably be improved.
>
> In order to get the tests to run, the modules/portlib/build.xml sets
> LD_LIBRARY_PATH on unix to enable libhyprt.so and friends to be found.
> On windows I've tried to set the PATH but have suffered from some
> issues with the interaction of the case-sensitive variables in ant
> and case-insensitive variables in windows.  I've currently left an
> 'unless="is.windows"' in modules/portlib/ build.xml because of these
> issues - and because when it fails it brings up a dialog box hanging any
> automated builds.
>
> I'd really, really appreciate any insight people might have in making
> the execution of these tests reliable on windows.
>
> Regards,
> Mark.
>
>
>
>


-- 
Spark Shen
China Software Development Lab, IBM