test with a 3rd party jar file?
chris.hegarty at oracle.com
Thu Jun 27 10:34:09 UTC 2013
On 27/06/2013 08:50, huizhe wang wrote:
> Hi Chris,
> Thanks for the information! I'll give it a try.
> On 6/26/2013 6:18 AM, Chris Hegarty wrote:
>> The streams package recently added tests for exercising
>> package-private implementation.
>> Top level dir contain the TEST.properties to add to the bootclasspath:
> Do you mean TEST.properties need to be in the top level directory (e.g.
> javax/xml/jaxp), can it be put anywhere that contains a block of tests?
Yes, I believe so. You must put it somewhere that it does not impact on
other tests, since all tests below that directory hierarchy will be
impacted by it.
> In my particular case, I only want to run a single test with the jar
> file on the bootclasspath.
Create a directory structure somewhere in the regression library
appropriate to your changes, say javax/xml/jaxp/boottest/. Create
javax/xml/jaxp/boottest/TEST.properties. Then put your test at
javax/xml/jaxp/boottest/xxx/yyy/zzz/Test.java ( where xxx.yyy.zzz is
your package name ).
>> Example, individual test, whose test is in the java.util.stream package:
>> On 25/06/2013 01:51, huizhe wang wrote:
>>> Thanks Sean and Rob.
>>> Yes, I was told before to avoid shell scripts in tests. I'll wait till
>>> after your investigation to see what's the best to do in this case.
>>> On 6/24/2013 3:42 PM, Rob McKenna wrote:
>>>> Some interesting conversations were had lately about shell scripts
>>>> during Joe Darcy's recent infrastructure tech talk. In particular
>>>> around the idea of a "jdk.testing" package to provide libraries that
>>>> would help with the types of operations seen in shell scripts. I'm
>>>> really hoping to spend some time on this myself over the coming weeks.
>>>> (in an effort to at least understand why we need shell scripts and
>>>> whether we could do something else instead)
>>>> In any case it should be possible to simply replace the script with a
>>>> java program that does the same thing. That would require fiddling
>>>> with Process however, and its debatable as to whether that would
>>>> result in fewer test failures. (shell scripts counting for a
>>>> proportionally large number of those failures) JSR199 might help to
>>>> reduce the amount of ProcessBuilders required in this instance.
More information about the core-libs-dev