help using @library
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Oct 17 07:30:39 PDT 2012
Adding .jar files into any JDK repo is likely to be met with resistance.
Currently, JDK provides some limited support for JUnit, but due to
licensing issues, we're changing to support TestNG support instead. You
might want to consider using TestNG in your tests.
-- Jon
On 10/17/2012 05:50 AM, Alex Schenkman wrote:
> Hi list,
>
> I'm trying to use the @library tag.
> Here follows my JTREG definition:
>
> /**
> * @test Bar.java
> * @library ./junit-4.jar
> * @build Bar
> * @run main/othervm
> * com.oracle.foo.Bar
> */
>
>
> Here is the failing output (shortened):
> #Test Results (version 2)
> #-----testdescription-----
> $file=/workspace/test/com/oracle/foo/Bar.java
> $root=/workspace/test
> library=./junit-4.jar
> run=USER_SPECIFIED build Bar\nUSER_SPECIFIED main/othervm com.oracle.foo.Bar\n
> source=Bar.java
> #-----environment-----
>
> #section:compile
> ----------messages:(3/163)----------
> command: compile /workspace/test/com/oracle/foo/Bar.java
> reason: .class file out of date or does not exist
> elapsed time (seconds): 0.4
> ----------System.out:(0/0)----------
> ----------System.err:(9/429)----------
> /workspace/test/com/oracle/foo/Bar.java:34: error: package org.junit does not exist
> import static org.junit.Assert.*;
>
> The file /workspace/test/junit-4.jar exists.
>
> Thanks in advance!
>
>
> PS: If you are inside Oracle, look at this test:
> jdk/test/closed/java/awt/Graphics2D/DrawRenderedImageXlate.java
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/jtreg-use/attachments/20121017/139dba67/attachment.html
More information about the jtreg-use
mailing list