jtreg and junit

Henri Gomez henri.gomez at gmail.com
Fri Sep 30 00:58:06 PDT 2011


A new clean thread about jtreg and junit.

I study one of the failed test (java/lang/Double/R1388007FloatOverflow.java)

/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/jdk/test/java/lang/Double/R1388007FloatOverflow.java:30:
error: package junit.framework does not exist
import junit.framework.*;
^
/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/jdk/test/java/lang/Double/R1388007FloatOverflow.java:32:
error: cannot find symbol
public class R1388007FloatOverflow extends TestCase
                                           ^
  symbol: class TestCase
/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/jdk/test/java/lang/Double/R1388007FloatOverflow.java:47:
error: cannot find symbol
    public static Test suite() {
                  ^
  symbol:   class Test
  location: class R1388007FloatOverflow
/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/jdk/test/java/lang/Double/R1388007FloatOverflow.java:44:
error: cannot find symbol
        assertEquals(n2, -1.0, 0.0);
        ^
  symbol:   method assertEquals(double,double,double)
  location: class R1388007FloatOverflow
/Users/henri/Documents/jenkins/data/jobs/openjdk-1.7-macosx-universal/workspace/jdk/test/java/lang/Double/R1388007FloatOverflow.java:48:
error: cannot find symbol
        return new TestSuite(R1388007FloatOverflow.class);
                   ^

Tried with junit 4.5 and 4.8.2, each renamed to junit.jar and
installed under lib dir :

/Users/henri/Documents/jenkins/data/DROP_DIR/jtreg/lib/
total 10584
-rw-r--r--@ 1 henri  staff  4218879 11 jul 19:27 javatest.jar
-rw-r--r--@ 1 henri  staff   500645 11 jul 19:27 jh.jar
-r--r--r--@ 1 henri  staff   457045 11 jul 19:28 jtreg.jar
-rw-r--r--  1 henri  staff   237344 28 sep 14:31 junit.jar

junit.jar contents is as expected :

...
    testing: junit/extensions/ActiveTestSuite$1.class   OK
    testing: junit/extensions/ActiveTestSuite.class   OK
    testing: junit/extensions/RepeatedTest.class   OK
    testing: junit/extensions/TestDecorator.class   OK
    testing: junit/extensions/TestSetup$1.class   OK
    testing: junit/extensions/TestSetup.class   OK
    testing: junit/framework/Assert.class   OK
    testing: junit/framework/AssertionFailedError.class   OK
    testing: junit/framework/ComparisonCompactor.class   OK
    testing: junit/framework/ComparisonFailure.class   OK
    testing: junit/framework/JUnit4TestAdapter.class   OK
    testing: junit/framework/JUnit4TestAdapterCache$1.class   OK
    testing: junit/framework/JUnit4TestAdapterCache.class   OK
    testing: junit/framework/JUnit4TestCaseFacade.class   OK
    testing: junit/framework/Protectable.class   OK
....

How did jtreg construct it's path to get junit.jar ?


Thanks


More information about the macosx-port-dev mailing list